Wednesday, August 07, 2013

Re: [Cpp-Programming] Read position issue within an IOSTREAM class

I couldn't copy the error. I believe that the problem is due to an error in the way I implemented the code.  In the compiler, the cached information is copied to a temporary instance of a class acting as a wrapper to the iostream class.  Then this instance is pushed onto the previous instance of the class as a cross pointer.  The following is the code I use to perform this function:
----------------------
void CSource_Attach (CSource* I)
{
 I->PrevC=CurIn;
 CurIn=I;
}
----------------------
CSource is the wrapper class; I is the instance to push, and PrevC is a member pointer to the previous instance of the class.  Am I doing something wrong?
 
BTW, I tokenize the keywords and types upon reading, but the writing of these appears to work.

On Wednesday, August 7, 2013 11:07:59 AM UTC-4, Harry Potter wrote:
The code is pretty complex.  I will try to water it down.
 

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-programming+unsubscribe@googlegroups.com.
To post to this group, send email to cpp-programming@googlegroups.com.
Visit this group at http://groups.google.com/group/cpp-programming.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [Cpp-Programming] Read position issue within an IOSTREAM class

The code is pretty complex.  I will try to water it down.

On Wednesday, August 7, 2013 10:22:29 AM UTC-4, Charlie wrote:
Post the code, and we can probably see exactly what you're trying to do.  This is for school?
 
As one person said, comparing c++ to c is like comparing Dutch to German... well he said French to English.
 
-Charlie
 

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-programming+unsubscribe@googlegroups.com.
To post to this group, send email to cpp-programming@googlegroups.com.
Visit this group at http://groups.google.com/group/cpp-programming.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [Cpp-Programming] Read position issue within an IOSTREAM class

Post the code, and we can probably see exactly what you're trying to do.  This is for school?
 
As one person said, comparing c++ to c is like comparing Dutch to German... well he said French to English.
 
-Charlie
 
Sent: Wednesday, August 07, 2013 9:03 AM
Subject: [Cpp-Programming] Read position issue within an IOSTREAM class
 
I need to fill an IOSTREAM class with a part of a file during the process of compiling a C program using multiple passes in a compiler written in C++.  I fill the new instance of an input stream with a part of a file.  This stream stores and processes the auto variables defined within a function.  My plan is to read the part of a function until the first executable statement.  It seems to that.  However, during the declaration phase, nothing is declared.  I'm wondering if maybe I need to explicitly set the read pointer to the beginning of the buffer.  Is this true?  If so, how do I reset the pointer?  I'm sorry about the newbie question, but I don't have available C++ documentation. --
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-programming+unsubscribe@googlegroups.com.
To post to this group, send email to cpp-programming@googlegroups.com.
Visit this group at http://groups.google.com/group/cpp-programming.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

[Cpp-Programming] Read position issue within an IOSTREAM class

I need to fill an IOSTREAM class with a part of a file during the process of compiling a C program using multiple passes in a compiler written in C++.  I fill the new instance of an input stream with a part of a file.  This stream stores and processes the auto variables defined within a function.  My plan is to read the part of a function until the first executable statement.  It seems to that.  However, during the declaration phase, nothing is declared.  I'm wondering if maybe I need to explicitly set the read pointer to the beginning of the buffer.  Is this true?  If so, how do I reset the pointer?  I'm sorry about the newbie question, but I don't have available C++ documentation.

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-programming+unsubscribe@googlegroups.com.
To post to this group, send email to cpp-programming@googlegroups.com.
Visit this group at http://groups.google.com/group/cpp-programming.
For more options, visit https://groups.google.com/groups/opt_out.