Weird problem with sscanf

This is a discussion on Weird problem with sscanf within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by swgh On a side note, it is not usually a good idea to mix C and C++ ...

  1. #16
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476
    Quote Originally Posted by swgh
    On a side note, it is not usually a good idea to mix C and C++ code. Either do it one way or the other
    Yeah, I know that. The code is done because I didn't know the proper way to do it in C++. And because my application is getting bigger, I somewhat reluctant to rewrite it. After all, there's still many things to do than tweaking the code.

  2. #17
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476
    2 Salem:

    Okay, I've made a new app with only the class, the constructor of the class, and the init function. And guess what, it didn't show any error and worked fine. BTW, the faulty code was actually worked fine at first. Then I added five more integer input before mWidth (the IndexKoma to IndexEs) and after that the code always read mWidth = 0 regardless of the actual value in the file.

  3. #18
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,062
    Quote Originally Posted by g4j31a5
    Yeah, I know that. The code is done because I didn't know the proper way to do it in C++. And because my application is getting bigger, I somewhat reluctant to rewrite it. After all, there's still many things to do than tweaking the code.
    Well it's only going to get bigger and more complicated. This would be good practice in learning how to break your code up into logical segments and update it one segment at a time.
    Sent from my iPadŽ

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Weird problem on '02 3.4L V6 auto
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-11-2006, 11:05 PM
  2. Really Weird itoa Problem
    By Grantyt3 in forum C++ Programming
    Replies: 8
    Last Post: 12-19-2005, 11:44 PM
  3. very weird problem (pointers I think)
    By hannibar in forum C Programming
    Replies: 2
    Last Post: 10-11-2005, 06:45 AM
  4. Replies: 6
    Last Post: 05-12-2005, 03:39 AM
  5. Weird class problem!
    By aker_y3k in forum C++ Programming
    Replies: 2
    Last Post: 09-25-2002, 06:12 AM

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