Thread: Assigning something

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    29
    This has to do with modular decomposition. The code I gave was in the c file. This one below is in the h.file.

    Code:
    typedef struct 
    {
     int id;
     char code;
    }Key;

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So now you are making a pointer from an integer without a cast, because code is a single character and cannot be used in a string context.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Assigning Ability Scores
    By SteelySam in forum C++ Programming
    Replies: 1
    Last Post: 07-10-2008, 02:16 PM
  2. Assigning a non null-terminated string
    By BattlePanic in forum C Programming
    Replies: 7
    Last Post: 05-04-2008, 10:02 PM
  3. silence warning when assigning pointers
    By eth0 in forum C Programming
    Replies: 5
    Last Post: 10-27-2005, 11:18 AM
  4. Assigning memory address of member struct to pointer.
    By Tronic in forum C++ Programming
    Replies: 2
    Last Post: 03-20-2004, 05:53 PM
  5. Assigning the value of a const array to a normal array
    By Accident Prone in forum C++ Programming
    Replies: 6
    Last Post: 08-11-2003, 10:40 PM