What I am trying to do is make a simple header file (to be 
referenced in a main .cpp file). The header file will contain a 
class with all of the appropriate variables and member functions 
defined.  Here is a sample of the code. 

#ifndef str.h
#define str.h

class String  {
        char *s;
        char str;
        s = str;
public:
        String();
        String( char *);
        setString(char *s)
        {
                str=(char *)malloc(strlen(s)+1);
        }
};


#endif




But I am receiving a few errors of which I don't know exactly how to 
fix.  Can someone please help?  Thanks and here are the errors.

str.h(1) : warning C4067: unexpected tokens following preprocessor 
directive - expected a newline

str.h(2) : error C2008: '.' : unexpected in macro definition

str.h(7) : error C2327: 'String::h' : member from enclosing class is 
not a type name, static, or enumerator

str.h(7) : error C2258: illegal pure syntax, must be '= 0'


Those are the main ones anyways.  The rest I think I know why they 
happened.  Thanks.











------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe : [EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To reply to this message, go to:
    
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4528
    Please do not reply to this message via email. More information here:
    http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> To visit your group on the web, go to:  
    http://groups.yahoo.com/group/Programmers-Town/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to