![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
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. |
|
|
|
|
|
#2 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
#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! |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
thanx a lot..
|
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
That is basic stuff. I recommend reading a good tutorial teaching you the basics of the C++ language.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|