LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   parse error before ; and } and , and return (https://www.linuxquestions.org/questions/programming-9/parse-error-before-%3B-and-%7D-and-and-return-322625/)

gogettergary 05-12-2005 01:33 AM

parse error before ; and } and , and return
 
the code is :
#ifndef CMetaInfoReader_h

#define CMetaInfoReader_h 1

template <class super>

class CMetaInfoReader : public super{

public:

CMetaInfoReader(){}

void MyService()

{

if(m_pDataFile->isFileOpened()==ALREADY_EXISTS)

{

m_pStorageHeader=(CStorageHeader*)(m_pDataFile->getBaseAddress());

m_iShift=(char*)(m_pDataFile->getBaseAddress())-(char*)(m_pStorageHeader->get_m_pBaseAddress());

if(m_iShift)

{

// cout<<"\n********* this is the shift case********************";

m_pStorageHeader->relocate_Pointers(m_iShift);

// m_pStorageHeader

}

}







}



};

#endif

the error is : from rfc_croutingflowcontroller.cpp:22:
/usr/include/IDB/ICHOROUS/include/VMM/StorageManager/CMetaInfoReader.h: In
member function `void CMetaInfoReader<super>::MyService()':
/usr/include/IDB/ICHOROUS/include/VMM/StorageManager/CMetaInfoReader.h:11: parse
error before `;' token


can anybody point out where exactly the error is.we r compiling using gcc .


garima

jschiwal 05-12-2005 03:20 AM

Perhaps you could use indentation and less than 5 empty lines between lines of code to make it easier for people to read. You may get better responce that way. Also enclose the code between [ code] ... [ /code] markup when posting. (

Thanks.

PS. You have 5 open braces '{' and 4 closing braces '}'

ta0kira 05-12-2005 03:38 AM

I see 5 or so things that do not have a declaration, and you haven't included any headers or sources. This can't be the entire code, otherwise there would be a LOT more errors.
ta0kira

PS jschiwal: I think there are enough } for the {. I counted a few times, but I might be missing a {.

__J 05-12-2005 04:19 AM

Re: parse error before ; and } and , and return
 
Quote:

Originally posted by gogettergary
.we r compiling using gcc .


garima

is that a typo or are you really trying to compile it with gcc?

jschiwal 05-12-2005 05:20 AM

I miscounted myself.

Googling, I found this message from a couple of days ago.
http://www.linuxquestions.org/questions/history/321622

Being curious, I found this on the web:
http://www.transtech-dsp.com/software/pftools.asp


All times are GMT -5. The time now is 03:01 AM.