[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] expected identifier before "public"



Hej

Ved ikke hvad der gik galt, men loesningen er
========================================
...
class CAudioSource : public CSource {
public:
CAudioSource(CConfig* pConfig, char* source) : CSource(pConfig, source) {
=============================================


Beklager forstyrrelsen ;-)

P

Peter Maersk-Moller wrote:
Hej

Jeg har fundet ud af, at jeg kan kompilere

========================================
...
class CAudioSource : public CSource {
  public:
        CAuioSource() {
...
========================================

men saa loeber jeg ind i problemer naar jeg aendrer CSource med argumenter som her

====================================================
class CSource {
public:
CSource(CConfig* pConfig, char* source);
~CSource();
private:
};
class CAudioSource : public CSource {
public:
CAudioSource(CConfig* pConfig, char* source) {
};
~CAudioSource();
private:
};
=============================================================
In file included from media_source.cpp:10:
media_source.h: In constructor `CAudioSource::CAudioSource(CConfig*, char*)':
media_source.h:9: error: no matching function for call to `CSource::CSource()'
media_source.h:1: note: candidates are: CSource::CSource(const CSource&)
media_source.h:3: note: CSource::CSource(CConfig*, char*)
make: *** [media_source.lo] Error 1


Hvad goer man saa ? Og hvorfor brokker den sig ?

mvh.
P

Peter Maersk-Moller wrote:
Hej

Jeg har disse simple erklaeringer, men kan ikke se, hvad jeg goer galt.
Compileren brokker sig over linje 13. Hvad er det jeg ikke ser ?

mvh.

Peter

=======================================================================
class CSource {
public:
CSource();
~CSource();
bool Init();
bool Start();
bool Stop();
private:
};
class CAudioSource : public CSource {
public:
CAuioSource() :
public CSource() {
};
~CAudioSource();
private:
};
=======================================================================
# make
.......
if /bin/sh ../libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../vendor/dvs/development/include -I../vendor/SomeVendor/include -D_REENTRANT -DNOCONTROLS -Wall -fexceptions -g -O2 -MT media_source.lo -MD -MP -MF ".deps/media_source.Tpo" -c -o media_source.lo media_source.cpp; \
then mv -f ".deps/media_source.Tpo" ".deps/media_source.Plo"; else rm -f ".deps/media_source.Tpo"; exit 1; fi
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../vendor/dvs/development/include -I../vendor/SomeVendor/include -D_REENTRANT -DNOCONTROLS -Wall -fexceptions -g -O2 -MT media_source.lo -MD -MP -MF .deps/media_source.Tpo -c media_source.cpp -fPIC -DPIC -o .libs/media_source.o
In file included from media_source.cpp:10:
media_source.h: In constructor `CAudioSource::CAudioSource()':
media_source.h:13: error: expected identifier before "public"
media_source.h:13: error: expected `(' before "public"
media_source.h:13: error: expected `{' before "public"



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-09-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *