| delorie.com/archives/browse.cgi | search | 
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f | 
| Date: | Thu, 23 Mar 2006 12:15:25 +0200 | 
| From: | alex bodnaru <alexbodn AT 012 DOT net DOT il> | 
| Subject: | Re: I cant quite link this... | 
| In-reply-to: | <1143094025.533433.195220@i39g2000cwa.googlegroups.com> | 
| To: | djgpp AT delorie DOT com | 
| Message-id: | <4422753D.90201@alex3> | 
| MIME-version: | 1.0 | 
| X-Accept-Language: | en-us, he | 
| References: | <1143094025 DOT 533433 DOT 195220 AT i39g2000cwa DOT googlegroups DOT com> | 
| User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060205 | 
| Debian/1.7.12-1.1 | |
| Reply-To: | djgpp AT delorie DOT com | 
| Errors-To: | nobody AT delorie DOT com | 
| X-Mailing-List: | djgpp AT delorie DOT com | 
| X-Unsubscribes-To: | listserv AT delorie DOT com | 
hi,
the default return tpye of c functions is int. so you should have
specifically set void some...func(); in your class
alex
astonerbum AT gmail DOT com wrote:
> Here is a general picture of my files
> 
> /*foo.h*/
> #ifndef FOO_H
> #define FOO_H
> 
> class foo
> {
>   public
>      somefunc();
>   private
>      someotherfunc();
> };
> 
> #endif
> 
> /*foo.cpp*/
> #include<gl/gl.h>
> #include<math.h>
> #include"foo.h"
> 
> void foo::somefunc()
> {...}
> void foo::someotherfunc()
> {...}
> 
> /*the end*/
> 
> Now this will not compile... I get some messages pointing it gl.h and
> saying "expected constructor, destructor, or type conversion before
> 'void' ".... I am sure I am handling linking of the class to it's
> functions wrong, but its late and I cant seem to find the info. Can
> anyone be so kind as to help?
> 
> I use Dev-C++.
> 
> 
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |