Thread: Visual C/C++ ver. 6 Trouble :(

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868

    Visual C/C++ ver. 6 Trouble :(

    I have a C program, and it runs OK, in Visual C 6, until I want to step through the code - then:

    Every few lines of code, *UP* pops a "Find Source" window, and it would like to know where it can find the file "printf.c", or "fopen.c" or "fputc.c", or any of numerous other C functions, in the code.

    I have tried everything to get it to stop this nonsense, but it continues unabated. Note that the program runs fine, in both release or debug versions.

    After closing this window, the *Disassembly Window* pops up, and now I can only step through my code, in assembly - "Assembly!!? Where's the 12 gauge? I'm a gonna bag me one compiler, I do believe."

    I've also loaded the program as a C++ program, (with .cpp in the filename extension), but it makes no difference.

    I've never seen this "Find Source" pop-up window, before. This is a default install of Vis.C/C++ 6.0, in every respect, running on a WindowsXP system, with all updates.

    Thanks.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Strange. You know they just recently (week or two ago) came out with a major security patch - I'm assuming you've gotten that one already then? If nothing else, try a reinstall, obviously.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Kinda sounds like you're trying to step into the standard functions fopen/fprintf/etc... If that's the case then stop trying, always step over (never into) such functions.
    "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

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    If that's the case then stop trying, always step over (never into) such functions.
    I think that's your answer.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by bithub View Post
    I think that's your answer.
    Well, no, that's not the answer.
    Just browse on your hard drive where the source files are installed (don't know where that is on such an ancient IDE such as v6, however).
    If you don't do that, then VS can obviously not show you the source and does the next best thing - it shows the assembly of the function.
    If neither of the above is for you, then just step over them (F10).

    And btw, if you can, upgrade.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Why would he want to step through the source code for printf and the other standard functions?

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You can use it to debug why your output is wrong, for example. Subtle things the eye might not spot.
    Regardless, I don't like to block options that are available. The programmer will choose what is best, not us.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Thanks, everyone!

    I haven't used VC 6 in quite a while, and in a late-nite session, I got tangled up with the project/workspace set up, and somehow the step and step into keys both started acting the same. I had forgotten VC would step into a header function, as well.

    Making a new project fixed the problem and thanks for the tip about stepping into and stepping over during debugging. Obviously, I need to step into some of my functions, but I have no need to step into the header's functions.

    The program is now fixed and running. In fact, it's enumerated 420 million Sudoku grids, already.

    Which is why I was using VC 6 for the compiler. It generates faster programs for Windows, than Turbo C/C++ 1.01.

    After reading the post about Open Watcom's compiler, I'll have to give it a try, also.

    Speed is very important for this program. It has a LONG way to go before it's done, but that will be another thread entirely.

    Thanks again!

  9. #9
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Adak View Post
    Which is why I was using VC 6 for the compiler. It generates faster programs for Windows, than Turbo C/C++ 1.01.
    I believe VC++ 2008 would make a huge speed difference compared to VC++ 6.0. Maybe you should try it, since it's free...
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  10. #10
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    I believe VC++ 2008 would make a huge speed difference compared to VC++ 6.0. Maybe you should try it, since it's free...
    Has Microsoft's C compiler really changed all that much since VC6? I know the C++ compiler is way different (and way more standard), but I wasn't aware of any major changes to the C compiler.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM