Thread: Returning an integer ... not returning; weird error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Imanuel
    The tokenizer.cpp is supposed to return an integer representing the token count. Somehow it does not.
    What do you mean by "somehow it does not"? Are you saying that your tokens::tokenizer function runs into an infinite loop?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    178
    Quote Originally Posted by laserlight View Post
    What do you mean by "somehow it does not"? Are you saying that your tokens::tokenizer function runs into an infinite loop?
    No, what I mean is when I perform a trace of function execution, the value is correct at the return but when verifying the value is passed into the variable to receive the return it is 0;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. physics class returning weird numbers
    By avgprogamerjoe in forum C++ Programming
    Replies: 1
    Last Post: 09-17-2007, 08:13 PM
  2. Recursion: base case returning 1, function returning 0
    By yougene in forum C Programming
    Replies: 5
    Last Post: 09-07-2007, 05:38 PM
  3. returning error on if/else in function
    By xion in forum C++ Programming
    Replies: 6
    Last Post: 06-12-2004, 03:45 AM
  4. error when returning template type~
    By black in forum C++ Programming
    Replies: 5
    Last Post: 06-01-2004, 01:33 AM
  5. kernel keeps returning a clos() error
    By Chronom1 in forum Linux Programming
    Replies: 2
    Last Post: 03-30-2004, 06:21 PM