invalid conversion from (void *) to unsigned char

This is a discussion on invalid conversion from (void *) to unsigned char within the C Programming forums, part of the General Programming Boards category; Hello! I'm having trouble compiling my application. I was using gcc to compile the code, but now i have to ...

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    5

    invalid conversion from (void *) to unsigned char

    Hello!

    I'm having trouble compiling my application. I was using gcc to compile the code, but now i have to compile it using g++...
    But when using g++, i always get the error "invalid conversion from void* to unsigned char"...

    I know, that the g++ compiler is ment for C++...

    I'f you require the code, I would be happy to post it.

    Is there a straight-forward solution for my problem?

    thanks

    Rok

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,662
    Post the smallest and simplest program that demonstrates the problem. Chances are you need to use a cast where C allows an implicit conversion from void*, but that is for a conversion from void* to a pointer type, not unsigned char.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  2. Heap corruption using zlib inflate
    By The Wazaa in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2007, 12:43 PM
  3. Need help understanding info in a header file
    By hicpics in forum C Programming
    Replies: 8
    Last Post: 12-02-2005, 11:36 AM
  4. Can't Find Conio.h?
    By drdroid in forum C++ Programming
    Replies: 27
    Last Post: 09-26-2002, 04:24 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM

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