Hi,
I am having problem with my program, I have made a small program of a class where I have used "for loop" and I wanted to use an integer "i" in this program . The user inputs value which is stored in "i" and then the value stored in "i" is used in a function.
My program is as follows:
------------------------------------------------------Code:#include<iostream> Class "Student" { public: getName(); getAddress(); getRollNumber(); private: char Name; char Address; char RollNumber; }; main() { for ( i=0; i<5; i++) { cout<<" Pls enter the name"; cin >>i.Name; if(i!=char) { cout<<"Pls enter the name in character" } else
I haven't continued this program but I wanted to know that how can I use the character input by user to store it in "i" and then use that "i" in the getName ,or getAddress function?
How can I declare "i" before using it?
I hope my question is clear
Thanks