Simple Snellen to Decimal / logmar

  Simple code for converting to logmar in java   import java.util.Scanner; public class Monster { public static double snellenNum; public static double snellenDen; public static double logmar = 0.0; static Scanner UserInput = new Scanner(System.in); public...

How to slow down your C++

  If you want a delay in your program before it moves tot he next part of code, this will help:   //you will need to include this at the top of your page #include <windows.h> // then when you want the delay to be used Sleep (100) //you can adjust the...

Visual Studio C++ Close your program

  To make a button that will close your program down is simple. All you need to do is select a button from the tool box, add it to your form, then double click it, this should take you to your code. If your “form” is called Form1, which it will be...

Visual Studio C++ textBox

  How to change the text in the textBox   std::string myfatstring="blah blah"; textBox2->Text = gcnew String(myfatstring.c_str()); //now your textBox2 text will say blah blah...

C++ File input/output

Simple creation of file etc   //these are needed #include <iostream> #include <fstream> //then when you need it std::ofstream myfile; myfile.open ("C:/example.txt"); // or where ever myfile << calibrate; myfile.close();   Another way is...