View Single Post
  #7   Spotlight this post!  
Unread 17-02-2013, 12:21
mrklempae mrklempae is offline
Registered User
no team
 
Join Date: Jan 2013
Location: Montana
Posts: 19
mrklempae is an unknown quantity at this point
Re: Printing to a text file

Thanks everyone! Everything seems to be working perfectly now, and we're on to the next problem. For some reason, when we try to read the data from the file using getline (which looks fine when we FTP it), we get the error
Code:
error: no matching function for call to `getline(std::ifstream&, int&)'
This is the actual code we're using to read the lines:
Code:
		if (counter <= 1500)
		{
		        if (Timer::GetPPCTimestamp() >= waitTimeout) //State machine  :D
			{
				//if ((!left.eof())&&(!right.eof()))
				//{
					rightval = std::getline(right, counter); //name of text file
                                        driverStationLCD->PrintfLine((DriverStationLCD::Line) 0, "%f", rightval);
                                        driverStationLCD->PrintfLine((DriverStationLCD::Line) 1, "%f", counter);
					driverStationLCD->UpdateLCD();
					counter++;
					waitTimeout += 0.01;
				//}
			}
Is this just a cRIO compatibility problem? We can get very similar code to run properly on a computer.
Reply With Quote