Thread: Strange errorwith feedback

  1. #1
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765

    Question Strange errorwith feedback

    I have a strange error.

    I input a few values, and when I display them to see whether I is correct, the name and the surname values are f***ed up.

    I've been sitting with this error four an hour, but still cant figure it out

    PLEASE HELP!!!!

    Run the exe file to see what I mean.

    The functions to enter the values in in the user.cpp file and the function cals are in the payinvoice.cpp file.


    I'm using borland c++ 5.02

  2. #2
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    You'll have to point me in the direction of the problem... I don't want to figure out how your code works just to help you

    (which file is the input/output in?)

  3. #3
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Wel as I said the input fnuctions is in the user.cpp file, and the output occurs in the payinvoice.cpp file

  4. #4
    Registered User quagsire's Avatar
    Join Date
    Jun 2002
    Posts
    60
    No memory is allocated for the char[] as no size is specified. Specify a size for the char[]. Also branchcode should be int, not int[].

    in user.h :
    Code:
          char name[];
          char surname[];
          char bank[];
          char branch[];
          int branchCode[];
          ...
          char company[];
    change to
    Code:
          char name[21];
          char surname[21];
          char bank[21];
          char branch[21];
          int branchCode;
          ...
          char company[21];
    in user.cpp
    Code:
    void User::getBranchCode()
    {
       input(19,3,branchCode,21);
    }
    change to
    Code:
    void User::getBranchCode()
    {
       input(19,3,&branchCode,21);
    }

  5. #5
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Thanx for the help.

    but what I still don't understand is the fact the when the feedback comes up, that only the company displays corect, as to where the company, surname and name is of the same data type?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strange number problem
    By kkjj in forum C Programming
    Replies: 9
    Last Post: 08-09-2007, 07:30 AM
  2. Strange results using dnsapi and windns
    By Niara in forum Networking/Device Communication
    Replies: 3
    Last Post: 08-13-2005, 10:21 AM
  3. Strange response from MSVC
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 04-17-2004, 07:40 AM
  4. Very strange bug...
    By JaWiB in forum Tech Board
    Replies: 6
    Last Post: 04-27-2003, 01:56 PM
  5. bcc32 compiling error (really strange!!)
    By jester in forum C++ Programming
    Replies: 14
    Last Post: 01-26-2002, 04:00 PM