LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2005, 01:33 AM   #1
gogettergary
LQ Newbie
 
Registered: May 2005
Posts: 4

Rep: Reputation: 0
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
 
Old 05-12-2005, 03:20 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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 '}'

Last edited by jschiwal; 05-12-2005 at 03:31 AM.
 
Old 05-12-2005, 03:38 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
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 {.

Last edited by ta0kira; 05-12-2005 at 03:41 AM.
 
Old 05-12-2005, 04:19 AM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
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?
 
Old 05-12-2005, 05:20 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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

Last edited by jschiwal; 05-12-2005 at 05:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse Error, but why? Mistro116@yahoo.com Programming 2 11-13-2005 02:38 PM
in gcc compiler error: parse error before string constsnt cynthia_thomas Linux - Networking 1 10-20-2005 01:29 AM
parse error with bc fisayo Programming 7 08-04-2005 09:23 AM
Parse Error verbatim Programming 3 04-22-2005 09:16 AM
parse error? ams Programming 5 03-02-2005 04:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration