- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
9 Posted Topics
can someone please explain to me 1) the difference between getline and gets(). 2) why sometimes when getline is used along with some other cin statements it skips some of the cin statements. :sad: 3)what exactly does the array of structures do? please help me out with this. | |
Re: #include<iostream.h> float my_sum(int r); void main() { int r; cout<<"Enter the radius"; cin>>r; my_sum(r); } float my_sum(int r) { float sum; sum = 2*3.14*r; cout<<"The circumference of a circle is "<<sum<<"."<<endl; } this will work. please let me know if it is fine or not. | |
Re: >> won't read white spaces. with gets u can. | |
can some please tell how can u hide whatever u are typing when typing in c++ exe. file? | |
Re: u can have unlimited no. its not just 1 row. it is as many as u want i guess. | |
Re: here is an example for u! #include <iostream.h> #include <fstream.h> #include <string.h> #include <iomanip.h> #include <conio.h> class phoneBook{ char name[20],phno[6]; public: void getdata(); void showdata(); char *getname(){ return name; } char *getphno(){ return phno; } void update(char *nm,char *telno){ strcpy(name,nm); strcpy(phno,telno); } }; void phoneBook :: getdata(){ cout<<"\nEnter Name : … | |
hai can anyone please help me find the error in my program? when i try to compile it says case bypasses initialisation of local variable. i can't figure out the mistake. i am sitting with this for a week. i will be thankful if someone could help me figure it … | |
hai can anyone please tell me whether it is possible to make graphics work in borland c++? thanks Tresa |
The End.