Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
getline() with visual c++

 
Post new topic   Reply to topic Printable version
 View previous topic  The use in ? in php Post :: Post returning array of strings in c++  View next topic  
Author Message
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Fri Dec 05, 2008 4:46 pm    Post subject: getline() with visual c++ Reply to topic Reply with quote

Code: Show/Hide
#include <iostream>
#include <stdlib.h>
#include <string.h>
using namespace std;

int main()
{
   string buf;
   cout<<"Enter a string: ";
   getline(cin,buf);

   system("pause");
}


In dev-c++ this would compile fine but visual c++ tell me getline() is undefined... I googled and found nothing, and I'm not talking about cin.getline(), I'm talking about getline(cin,buffer), any clue?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Fri Dec 05, 2008 4:52 pm    Post subject: Reply to topic Reply with quote

nevermind, the problem was it needs to be #include <string> not <string.h>
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 664 page(s) served in previous 5 minutes.

phpBB Created this page in 0.478227 seconds : 27 queries executed (80.9%): GZIP compression disabled