Thread: converting char to char???

  1. #1
    Registered User
    Join Date
    Nov 2002

    Question converting char to char???

    i have an error in my program that says :
    cannot convert 'char' to char*' in function main()
    i have went over it and cannot find the problem... does anyone know?

  2. #2
    Registered User datainjector's Avatar
    Join Date
    Mar 2002
    might be u are trying to put in a string array in a char varaible ....are you using functions might be u are passing wrong stuff ur code that will help us to find the problem
    "I wish i could wish my wishs away"

    "By indirections find directions out" -- William Shakespears

    "Do what thou wilt shall be the whole of the law" -- Crowley "THE BEAST 666"

    Mizra -> love = Death...
    RDB(Rocks yooo)..

    Are you ready for the Trix ???

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Compilers normally give you line number to go with the error messages..... that'll be a good place to start.

    char is a single char (byte)
    char* is a pointer to a char.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User
    Join Date
    Nov 2002
    char and char* are completely different types. I know it's confusing to understand at first, but that is how it works. Whenyou add a * to a type, it is like the differenec between int and char.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 08-11-2008, 11:02 PM
  2. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM
  3. Replies: 6
    Last Post: 06-30-2005, 08:03 AM
  4. Program Crashing
    By Pressure in forum C Programming
    Replies: 3
    Last Post: 04-18-2005, 10:28 PM
  5. comparing fields in a text file
    By darfader in forum C Programming
    Replies: 9
    Last Post: 08-22-2003, 08:21 AM