Thread: char Off[] = "Off";

  1. #1
    Shadow12345
    Guest

    char Off[] = "Off";

    char Off[] = "Off"; doesnt work, generates this error:
    C:\trigger state.cpp(8) : error C2258: illegal pure syntax, must be '= 0'

    and I don't know what this means

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You're probably trying to initailize a member variable in the class declaration. It should be done in the constructor, as the class declaration does not *define* any storage to hold this value.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Shadow12345
    Guest
    yep

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 02:06 PM
  3. Replies: 16
    Last Post: 10-29-2006, 05:04 AM
  4. Wierd Segmentation Faults on Global Variable
    By cbranje in forum C Programming
    Replies: 6
    Last Post: 02-19-2005, 12:25 PM
  5. I'm having a problem with data files.
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 05-14-2003, 09:40 PM