Thread: Visual C++ 6.0 Compiler

  1. #1
    Maybe? Maybe not...
    Join Date
    Feb 2005
    Location
    Atlanta
    Posts
    16

    Question Visual C++ 6.0 Compiler

    I keep having strange error messages show up at wierd times. The code looks more or less fine and I know some of the errors are true errors but some don't look right or look like they are caused by error in previous lines either.

    I have heard sometimes if you reuse the compiler enough before closing the program that it can get things stuck or locked in it and will do things like this. Will the Clean command under the build menu suffice to reset the compilier, or am I going completely crazy and just not seeing something?

    EDIT: Just out of curiosity. Is there a difference between a user defined header file and the standard header files that come with the compilier? I keep seeing don't put actual code in it which makes sense to a degree but it also sounds like you strip half the functional possibility for reusing code quickly. I understand that in a lot of cases putting code in a header can affect people who come in behind you to clean or update code but won't most development companies require all of the files related to the program before calling it complete anyway?
    Last edited by Taikon; 03-15-2005 at 01:10 PM. Reason: Another question

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Quote Originally Posted by Taikon
    I keep having strange error messages show up at wierd times. The code looks more or less fine and I know some of the errors are true errors but some don't look right or look like they are caused by error in previous lines either.
    Many times an error reported on a specific line can be caused by some syntax error on one of the lines above... so the line number reported to you by the compiler can be wrong in those cases. This is a somewhat common occurence.

    Quote Originally Posted by Taikon
    I have heard sometimes if you reuse the compiler enough before closing the program that it can get things stuck or locked in it and will do things like this. Will the Clean command under the build menu suffice to reset the compilier, or am I going completely crazy and just not seeing something?
    I think the 'clean' command simply deletes intermediate files used in the build process (.obj, .pch, .exe, .dll, .lib ect...).

    Quote Originally Posted by Taikon
    EDIT: Just out of curiosity. Is there a difference between a user defined header file and the standard header files that come with the compilier? I keep seeing don't put actual code in it which makes sense to a degree but it also sounds like you strip half the functional possibility for reusing code quickly. I understand that in a lot of cases putting code in a header can affect people who come in behind you to clean or update code but won't most development companies require all of the files related to the program before calling it complete anyway?
    Different how? Header files should not contain code, usually you just want to put things like function prototypes, maybe some #defines, extern declarations and struct declarations in your header files (unless this is some C++ templated code that needs to be accessible amongst many source files in which case you need to put the code in the header). Basically you are trying to just describe the interface of your functions to whomever may be using your code. The code itself is usually in a .lib file or a seperate source file that gets compiled/linked along with the rest of your project files to produce the final executable.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Maybe? Maybe not...
    Join Date
    Feb 2005
    Location
    Atlanta
    Posts
    16

    Question

    So C by itself or by standard has no provision for templated code?

    In the class Im about to finish on C, they didn't get very far but it LOOKS like about 40% or better of the operations from program to program were either extremely similar or the same. I think you could code them in a manner where you can reuse it constantly.

    Saddest thing is they only have the beginning C class. They have VB and Java for multiple levels but only one class in C. Same thing happened in highschool C was dropped for Java programming as an AP course (Advanced Placement course for college credit). Is it just the south or is this happening everywhere? C# seems to be coming up but thats windows only.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. maps in Visual Studio 6.0
    By Yasir_Malik in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2006, 04:12 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. header file bringing errors?
    By bluehead in forum Windows Programming
    Replies: 4
    Last Post: 08-19-2003, 12:51 PM
  4. Visual Studio 6.0 Help
    By L_I_Programmer in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2003, 10:35 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM