Hey guys, I have two newbie questions, is it possible to pass an ifstream variable to a function the same way you can pass an integer variable?
I was also wondering when cin.getline is used as follows is it better to use a string or an array?
Thanks in advance for any advice.
Code:char ch[10000]; cout<<"enter something"<<endl; cin.getline(ch, 10000);



LinkBack URL
About LinkBacks



I used to be an adventurer like you... then I took an arrow to the knee.
I was also wondering if I was using an array to loop through a txt files contents with the following code where word is the array and test2 is the ifstream variable could i also use a string instead of an array in this case or am I best keeping the array?