Or use this
cout<<"So thats your favorite number eh: "<<num<<"\n";
Type: Posts; User: Ivan!
Or use this
cout<<"So thats your favorite number eh: "<<num<<"\n";
ifstream infile("A:filelab.txt", ios::nocreate);
you are creating an instance of the CLASS ifstream :D
>Try a bit harder next time when looking. Try google. Try the *search button on the board.*
Whoops sorry, I think your right,
ignore this thread
What is the differnece between <iostream.h> and <iostream>,
just want to know..
As I dont know where cout.flush() is good for, I dont know why it works, but who cares: it works
Thanks!
void t1 ( void )
{ CONSOLE_SCREEN_BUFFER_INFO csbi;
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
COORD pos = { 10, 12 };
SetConsoleCursorPosition( h, pos );
...
:( no I couldnt find t in my compiler......
somebody else has an solution?
Well i came this far but it returns only crap, because I dont know how to use GetConsoleScreenBufferInfo properly I just guessed somewhat
CONSOLE_SCREEN_BUFFER_INFO csbi;...
I am using the gotoxy function and I have a question:
Is it possible to get the current x and y coordinates of your program f.e first gotoxy to lets say 5,6 and then return to the spot the cursor...
oh..:) well, thank you anyway
Hey you're right
gotoxy(20,20);
cout<<"Hi"<<endl;
int ch;
while ((ch = cin.get()) != '\n' && ch != EOF);
AARGG... again a stupid thread title? I think I am going insane now...
The one from the faq, it does work but not if I want to use it a second time beacause then he will use only the second and skips the first
And how do I go back to de default?
gotoxy(20,10); //only 8ox25
cout<<"hi";
gotoxy(0,0);
cout<<" how are you?";
Hmmmmm is it popular to use names like 'help me' or 'cannot run my program' ?
What's the error message?
A simple question: in the FAQ is a gotoxy function;
how do I use it?
This doesnt work:
gotoxy(100,20);
cout<<"Being on loacation 100,20";
I want to use it in a function in a class, that makes any difference?
I got: "fixed; undeclared identifier":confused:
And how to make it output a 7 as 7.0?
Say I have a double wich has a value of 4.567
How can let the output, using cout, be 4.57 or 4.6 ?
hmm, still getting the error messagges.. is it because I use static integers in my class? (I have initialized them though)
:confused: :confused: :confused: :confused:
uuuh... and then?
well im am trying to load a class, it does compile,but doesnt work :(
here's my code:
//prototype
void loadS(Student(*)[10]);
class Student
{
Thanx I needed that!