When using cout<< how do you make a "enter" happen? So it goes down to the next line.
When using cout<< how do you make a "enter" happen? So it goes down to the next line.
you can either use the endl like thisor by using \n like thisCode:cout<<"something in here"<<endl;Code:cout<<"something here \n";
2 ways - send 'endl' to the screen (a constant defined in iostream) or use the newline escape character in a string - '\n'.Code:cout << "Line 1" << endl << "Line 2\n" << "Line 3";
crud! I used /n! dang it!
ok I got anouther now... (I got alot)
Is it possible to have a program copy and paste something into the windows clipboard? Now I'm not asking how I am just asking if it is possible. And if it could you please point me to a tut or something.
Thank you
Edit: Oh and how do you clear the window?
Last edited by Rune Hunter; 08-21-2004 at 09:39 AM.
to clear the window (im guessing you mean clear screen)
Code:#include <iostream> #include <cstdlib> //this header is required to use the system //command. using namespace std; int main() { system("CLS"); //this will clear the screen . FOr linux replace CLS //with clear return 0; }
Last edited by noob2c; 08-21-2004 at 09:57 AM.
it syas there is not such directry as cstdlib. Maybe it was misspelled?
Edit: Never mind I didn't put the .h after it and it worked fine.
How do I... (Level 1) - clear the screen?
Also: \n will only output a newline without requiring a buffer flush. Use endl if you want to output a newline and flush the output buffer.
Think about it: notepad, IE, opera, <insert any commerical progarm>, all are able to work with the windows clipboard. What should this tell you about the possibility?Is it possible to have a program copy and paste something into the windows clipboard?
hehe ok I thought about it. So I guess I could!