Thread: iostream problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    Registered User
    Join Date
    Aug 2023
    Posts
    45
    This all the contents in common.h
    extern int currentLineNumber;
    extern int currentNestingLevel;

    This all the contents in common.cpp
    int currentNestingLevel = 0;
    int currentLineNumber = 0;

    Now you can see why I did not include it in the post, but I did include it in buffer.cpp! Commenting out this include is an error, I actually do include it!
    It's only used in one function.

    I did not know you cannot use namespaces in header files!!! But I also did not try to use it in header files for this project!

    I also made a little test project using fstream: I opened for reading, read, closed, opened for writing, wrote, closed etc and all compiled OK. I even put in "fstream file;" the line that my other project is complaining about and the compiler took that line also. So it can't be the compiler or the project. Something has got to be screwed up with the code of the includes in buffer.cpp.
    Last edited by maxcy; 08-29-2023 at 07:00 PM. Reason: typo

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IOSTREAM problem
    By joan in forum C++ Programming
    Replies: 13
    Last Post: 12-01-2006, 02:56 PM
  2. Problem during compile (iostream.h error)
    By JoJo in forum C Programming
    Replies: 4
    Last Post: 04-29-2003, 06:58 PM
  3. iostream problem. Help! :P
    By skyvoyager in forum C++ Programming
    Replies: 4
    Last Post: 08-05-2002, 10:14 PM
  4. iostream.h help???
    By chaoticseedalpha in forum C++ Programming
    Replies: 10
    Last Post: 01-29-2002, 10:12 AM
  5. Iostream
    By Staticman in forum Game Programming
    Replies: 2
    Last Post: 10-16-2001, 03:48 PM

Tags for this Thread