Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > compilation error

Reply
Thread Tools

compilation error

 
 
yeah
Guest
Posts: n/a
 
      11-13-2007

hi
I got the following errors while compiling my c++ file

bitstrm.cpp: In member function 'Void CInBitStream::bookmark(Bool)':
bitstrm.cpp:129: error: 'streampos' does not name a type
bitstrm.cpp:135: error: 'strmpos' was not declared in this scope
bitstrm.cpp:142: error: 'strmpos' was not declared in this scope

source:::
126://Void CInBitStream::bookmark (Bool bSet)
127:Void CInBitStream::bookmark (int bSet)
{
//static Bool bBookmarkOn = FALSE;
static int bBookmarkOn = FALSE;
static streampos strmpos;
static UInt uNumOfBitsInBuffer;
static Char chDecBuffer;
static Int lCounter;

if(bSet) {
strmpos = m_pInStream -> tellg();
uNumOfBitsInBuffer = m_uNumOfBitsInBuffer;
chDecBuffer = m_chDecBuffer;
lCounter = m_lCounter;
bBookmarkOn = TRUE;
}
else {
m_pInStream -> seekg (strmpos);
m_uNumOfBitsInBuffer = uNumOfBitsInBuffer;
m_chDecBuffer = chDecBuffer;
m_lCounter = lCounter;
bBookmarkOn = FALSE;
}
150:}

Is this need any header files to add

 
Reply With Quote
 
 
 
 
Michael DOUBEZ
Guest
Posts: n/a
 
      11-13-2007
yeah a écrit :
> hi
> I got the following errors while compiling my c++ file
>
> bitstrm.cpp: In member function 'Void CInBitStream::bookmark(Bool)':
> bitstrm.cpp:129: error: 'streampos' does not name a type
> bitstrm.cpp:135: error: 'strmpos' was not declared in this scope
> bitstrm.cpp:142: error: 'strmpos' was not declared in this scope
>
> source:::
> 126://Void CInBitStream::bookmark (Bool bSet)
> 127:Void CInBitStream::bookmark (int bSet)
> {
> //static Bool bBookmarkOn = FALSE;
> static int bBookmarkOn = FALSE;
> static streampos strmpos;

[snip]
> Is this need any header files to add


How can we know ? You only provided a small part of the code.

If you have included <iostream> and declared'using namespace std;' or
'using std::streampos;' it should be fine otherwise don't forget the
namspace:
static std::streampos strmpos;


Michael
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
const string error compilation - error C2679 Tassador C++ 0 07-19-2009 05:26 AM
Compilation error with seperate compilation C__chp C++ 4 02-15-2008 03:57 PM
[compilation error] debugging this error message "Object() in java.lang.Object cannot be applied to" Gavin Java 3 03-28-2007 05:57 AM
compilation error: "error: no matching function for call to 'String::String(String)' =?ISO-8859-1?Q?Martin_J=F8rgensen?= C++ 5 05-06-2006 03:48 PM
compilation error /usr/include/_G_config.h:29: parse error before "__mbstate_t" Vittal C Programming 2 07-08-2003 10:14 PM



Advertisments