[php]
#include <iostream>
using namespace std;
int main()
{
while(true)
{
float address;
cout << "Enter\n";
cin >> address;
cin.get();
system("cls");
}
}[/php]
hi guis,
i need a console:
i used this code for a console but there is a loop missing and i don t know how to code a loop > becouse i m still learning c++ someone have to edit this code and add a loop
what the programm have to do:Code:#include <iostream> using namespace std; int main() { float address; cin >> address; system("pause"); }
- if i type a adress like this in it: 0x97342 and i press enter the console have to be empty and ... i can do it again.. type a adress in it and if i press enter again its empty again. <<< please add this on the code
if someone can help me successfull he get credits for the console!
[php]
#include <iostream>
using namespace std;
int main()
{
while(true)
{
float address;
cout << "Enter\n";
cin >> address;
cin.get();
system("cls");
}
}[/php]
未来が見えなくて怖いから
未来が見えてしまって悲しいから
目を閉じて優しい思い出に浸ってしまう
Just get a regular book and learn form the beggining
Light travels faster than sound. That's why most people seem bright until you hear them speak.
This loop will run ten times:
Information:Code:#include <iostream> #include <conio.h> // getchar(); !Required only for pre 2010 Visual Studio's, and other IDE's. using namespace std; int main() { float address; for(int x = 0; x < 10; x++) { // You will be prompted x times to run through the loop. cin >> address; } getchar(); //system("pause"); Avoid the use of "system" commands, their slow on dismissle from the HEAP. // ...FIOS issue. Use getchar in place of ("pause") }
This application will run through a loop x times. Each time prompting you to enter a value for variable 'address'. The previous value in the variable 'address' (if any) will then be overwriten. To avoid over writing values please use a vector or an array, or simply different variables.
Last edited by JayFabulous; 09-07-2010 at 07:47 AM. Reason: removed system command