Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTPing .cpp files from a Unix box to Windows 1

Status
Not open for further replies.

Kojo105

Programmer
Jun 3, 2003
6
0
0
GB
I have done a binary ftp of a .cpp file from a Solaris box to window and then tried to build the .cpp file in Visual Studio. The attempted build results in the compiler reporting error that do not make sense e.g.

/////////////Code Fragment

#ifndef __APPTYPES_H_
#include "apptypes.h"
#endif

class CCalcAccess; // fwd ref to friend class
class CDataFile;
class QString;

class AppdbDllDeclare CCalcStatic
{
private:
ID m_CalcID;
char m_Reference[ 20];

private:

inline ID CalcID( void) const { return m_CalcID;}
inline const char* Reference( void) const { return m_Reference;}

void Print( ostream& Os);
BOOL Load( CDataFile& DbFile);
BOOL Load( int p_id, QString &p_sRef );
BOOL Write( CDataFile& DbFile);

friend class CCalcAccess;
};

class AppdbDllDeclare CCalcDynamic
{
private:
CalcStatus_e m_Status;
CalcState_e m_State;

private:
inline CalcStatus_e Status(void) const
......................................

//////////////////

////////Compilation Error Message
C:\SmartControl\Rti\Appdb\calcdata.h(38) : error C2146: syntax error : missing ';' before identifier 'm_Status'




Can anybody help?
 
Does it compile in Solaris ?
I take it the line
inline CalcStatus_e Status(void) const
missing a ;} is a cut & paste mistake ?

if u comment out the CalcStatus_e line, does the error message move to the next line?

I'd look at the include files for a missing ; if it does
 
Did that solved your problem?
You have to beware of such source-file transfers between Unix-like platforms and Windows because the windows compilers use the \r\n as a line delimiter, whereas in any unixes, the terminator is only \r.

Most Windows C/C++ compilers will burp errors because of that.

~~Razvan

[red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top