i am makign a huge list and the lsit goes off svcreen because its so big, i want to make a thing so liek after every ten lines the user has to press enter to view the next ten liens on the list
i am makign a huge list and the lsit goes off svcreen because its so big, i want to make a thing so liek after every ten lines the user has to press enter to view the next ten liens on the list
Pesudocode.
Very simple stuff.Code:while( !atEndOfList( ) ) { for( x = 0; x < outputsize; x++ ) { outputData( list ); } displayPausePrompt( ); }
Quzah.
Hope is the first step on the road to disappointment.
here is par tof the list, i dont think u got wut i meant
PHP Code:
cout << "Snow is " << snow << endl;
cout << "Ghost White is " << ghostwhite << endl;
cout << "White Smoke is " << whitesmoke << endl;
cout << "Grainsboro is " << grainsboro << endl;
cout << "Floral White is " << floralwhite << endl;
cout << "Old Lace is " << oldlace << endl;
cout << "Linen is " << linen << endl;
cout << "Antique White is " << antiquewhite << endl;
cout << "Papaya Whip is " << papayawhip << endl;
cout << "Blanched Almond is " << blanchedalmond << endl;
// need something here so code stops and doesnt continue untill you press enter
cout << "Bisque is " << bisque << endl;
cout << "Peach Puff is " << peachpuff << endl;
cout << "Navajo White is " << navajowhite << endl;
cout << "Moccasin is " << moccasin << endl;
cout << "Cornsilk is " << cornsilk << endl;
cout << "Ivory is " << ivory << endl;
cout << "Lemon Chiffon is " << lemonchiffon << endl;
cout << "Sea Shell is " << seashell << endl;
cout << "Honey Dew is " << honeydew << endl;
cout << "Mint Cream is " << mintcream << endl;
// need something here so code stops and doesnt continue untill you press enter
cout << "Azure is " << azure << endl;
cout << "Alice Blue is " << aliceblue << endl;
cout << "Lavender is " << lavender << endl;
cout << "Lavender Blush is " << lavenderblush << endl;
cout << "Misty Rose is " << mistyrose << endl;
cout << "White is " << white << endl;
You could make it much easier to display text with a class and a loop.
And the press enter thing
stdlib.h
system("PAUSE");
try it
std::cout << "Press enter to continue." << endl;
std::cin >> tempvar;
Just use a cin line as per above. You should be able to do it without a variable even, but it's been a while since I played with C++ streams, so it eludes me.
Quzah.
Hope is the first step on the road to disappointment.
tried that alreayd did work.]
Code:#include <iostream> #include <fstream> using namespace std; int main(void) { cout <<"Press enter to continue" <<endl; cin.get(); return 0; }
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
is the world broken? nothing works!
You might need to clear the input buffer first, try looking up cin.ignoreOriginally posted by Klinerr1
is the world broken? nothing works!
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Alright to just make it pause until you press enter use this simple statement its called getch(); or getchar(); if one doesn't work the other should and have a #include <conio.h> i think thats the right include just try it and out if it works then smile and keep making that program
best of luck (Snowy)
Simple Programming
:::: Error Message != A Smile ::::
Include <conio.h> at the beginning of your program.PHP Code:
cout << "Snow is " << snow << endl;
cout << "Ghost White is " << ghostwhite << endl;
cout << "White Smoke is " << whitesmoke << endl;
cout << "Grainsboro is " << grainsboro << endl;
cout << "Floral White is " << floralwhite << endl;
cout << "Old Lace is " << oldlace << endl;
cout << "Linen is " << linen << endl;
cout << "Antique White is " << antiquewhite << endl;
cout << "Papaya Whip is " << papayawhip << endl;
cout << "Blanched Almond is " << blanchedalmond << endl << flush;
getch();
cout << "Bisque is " << bisque << endl;
cout << "Peach Puff is " << peachpuff << endl;
cout << "Navajo White is " << navajowhite << endl;
cout << "Moccasin is " << moccasin << endl;
cout << "Cornsilk is " << cornsilk << endl;
cout << "Ivory is " << ivory << endl;
cout << "Lemon Chiffon is " << lemonchiffon << endl;
cout << "Sea Shell is " << seashell << endl;
cout << "Honey Dew is " << honeydew << endl;
cout << "Mint Cream is " << mintcream << endl << flush;
getch();
cout << "Azure is " << azure << endl;
cout << "Alice Blue is " << aliceblue << endl;
cout << "Lavender is " << lavender << endl;
cout << "Lavender Blush is " << lavenderblush << endl;
cout << "Misty Rose is " << mistyrose << endl;
cout << "White is " << white << endl;
u all must be using different compilers than I because the only working one is the pause. thanks!