Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 26th, 2006, 8:48 AM   #1
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3 boraciner is on a distinguished road
The easiest question for YOU.. :(

I couldn't get "hi world" from the user in C++ .Net

I know how to get in C with using gets() function , but I couldn't do this in Microsoft Visual Studio .NET 2003 ( c++ ) ..
please help me ... I wanna get a sentence from the user .. and print it on the screen..

Thanks.
boraciner is offline   Reply With Quote
Old Feb 26th, 2006, 9:23 AM   #2
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 639
Rep Power: 4 Jessehk is on a distinguished road
#include <iostream>
#include <string>

int main() {
     std::string input;

     std::cout << "Enter some text: ";
     std::getline(std::cin, input);

     std::cout << "You entered \"" << input << "\"." << std::endl;
     
     return 0;
}
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old Feb 26th, 2006, 9:52 AM   #3
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3 boraciner is on a distinguished road
thanx a lot..
boraciner is offline   Reply With Quote
Old Feb 26th, 2006, 10:24 AM   #4
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
That is basic stuff. I recommend reading a good tutorial teaching you the basics of the C++ language.
Polyphemus_ is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC