VC++ funcion call problem

This is a discussion on VC++ funcion call problem within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I've bumped into a strange problem. When a function is supposed to be called, VS starts executing some other ...

  1. #1
    Algorithm engineer
    Join Date
    Jun 2006
    Posts
    286

    VC++ funcion call problem

    Hi,

    I've bumped into a strange problem. When a function is supposed to be called, VS starts executing some other code (not the actual function!) in a file called xlocal, from where other functions are called; VS then starts jumping around between a lot of different functions. Eventually, it triggers an error message to come up, which says a lot of things; here you can see the hole message: http://img121.imageshack.us/img121/3...rormessage.png

    The original function call that is made looks like this:

    Code:
    s.print(0);
    where s is of a template class I've created.

    I've put a break point at that line, as well as a break point at the head of the function. VS has always been able to call this function before, but now it triggers an error after the function call has been made, but before the function has even been entered. Why doesn't it enter my function directly? What can I do about this? After all, VS doesn't do what I tell it to do but acts completely crazy!
    Come on, you can do it! b( ~_')

  2. #2
    Algorithm engineer
    Join Date
    Jun 2006
    Posts
    286
    A, found it! :P The problem was that the first argument of the function is either a string holding a filename, or an ostream& that the object should be printed to, depending of which version of the function is called. Each of the though takes an integer as an optional second argument. By some reason, the string version must have been called, and 0 was interpreted as a string. Strange. I had just removed the filename but forgot to replace it with cout.
    Come on, you can do it! b( ~_')

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem while constructing IP packet and sending using socket() system call
    By cavestine in forum Networking/Device Communication
    Replies: 10
    Last Post: 10-15-2007, 06:49 AM
  2. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  3. No call to execv
    By protocol78 in forum C Programming
    Replies: 4
    Last Post: 05-08-2007, 12:43 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM
  5. Pls help me to do this project in C I need source code
    By sureshmenon74 in forum C Programming
    Replies: 4
    Last Post: 10-04-2001, 07:57 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21