Thread: VC++ funcion call problem

  1. #1
    Algorithm engineer
    Join Date
    Jun 2006

    VC++ funcion call problem


    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:

    The original function call that is made looks like this:

    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
    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, 05:49 AM
  2. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  3. No call to execv
    By protocol78 in forum C Programming
    Replies: 4
    Last Post: 05-08-2007, 11:43 AM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06: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, 06:57 AM

Tags for this Thread