Newsgroup: it.comp.lang.c++
Titolo: perche???

Chi mi puo aiutare????....penso quasi nessuno xche non uso Win o Linux ma
BeOS, cmq..........il seguente codice non funziona, xche?
#include <fstream.h>
int width, height;
void LoadSetupFile(void)
{
ifstream in_file;
char buf[80];
in_file.open("setup.ini", ios::nocreate);
while(!in_file.eof())
{
  in_file >> buf;
  if(buf[0] == '#')
  {
   in_file.getline(buf, sizeof(buf), '\n');
  }
  else if(strcmp(buf, "WIDTH")==0)
  {
   in_file >> buf;
   width = atoi(buf);
  }
  else if(strcmp(buf, "HEIGHT")==0)
  {
   in_file >> buf;
   height = atoi(buf);
  }
}
}
grazie in anticipo!!

questo è quello che esce fuori se al prompt del terminal digito
make 2> error.txt
-----------------------------------------error.txt
start-----------------------------------------------------------------------
-----------
In file included from /boot/develop/headers/cpp/iostream.h:31,
                 from /boot/develop/headers/cpp/fstream.h:30,
                 from
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c:4:
/boot/develop/headers/cpp/streambuf.h:35: parse error before string constant
/boot/develop/headers/cpp/streambuf.h:67: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:67: parse error before `streambuf'
/boot/develop/headers/cpp/streambuf.h:67: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:87: parse error before `streambuf'
/boot/develop/headers/cpp/streambuf.h:87: warning: no semicolon at end of
struct or union
/boot/develop/headers/cpp/streambuf.h:88: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:97: parse error before `}'
/boot/develop/headers/cpp/streambuf.h:126: parse error before `ios'
/boot/develop/headers/cpp/streambuf.h:128: parse error before `&'
/boot/develop/headers/cpp/streambuf.h:128: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:129: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:133: conflicting types for
`streamsize'
/boot/develop/headers/cpp/streambuf.h:80: previous declaration of
`streamsize'
/boot/develop/headers/cpp/streambuf.h:179: parse error before `*'
/boot/develop/headers/cpp/streambuf.h: In function `tie':
/boot/develop/headers/cpp/streambuf.h:179: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:180: `save' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:180: (Each undeclared identifier is
reported only once
/boot/develop/headers/cpp/streambuf.h:180: for each function it appears in.)
/boot/develop/headers/cpp/streambuf.h:180: `val' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:180: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `fill':
/boot/develop/headers/cpp/streambuf.h:183: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:185: `newf' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:186: parse error before `flags'
/boot/develop/headers/cpp/streambuf.h: In function `flags':
/boot/develop/headers/cpp/streambuf.h:186: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:188: `fmtflags' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:188: `new_val' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:188: `old_val' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:188: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `precision':
/boot/develop/headers/cpp/streambuf.h:189: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:191: `newp' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:193: parse error before `setf'
/boot/develop/headers/cpp/streambuf.h:193: parse error before `val'
/boot/develop/headers/cpp/streambuf.h: In function `setf':
/boot/develop/headers/cpp/streambuf.h:194: `fmtflags' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:194: parse error before `oldbits'
/boot/develop/headers/cpp/streambuf.h:195: `val' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:195: `oldbits' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:195: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:196: parse error before `setf'
/boot/develop/headers/cpp/streambuf.h:196: parse error before `val'
/boot/develop/headers/cpp/streambuf.h:196: redefinition of `setf'
/boot/develop/headers/cpp/streambuf.h:193: `setf' previously defined here
/boot/develop/headers/cpp/streambuf.h: In function `setf':
/boot/develop/headers/cpp/streambuf.h:197: parse error before `oldbits'
/boot/develop/headers/cpp/streambuf.h:198: `mask' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:198: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:199: parse error before `unsetf'
/boot/develop/headers/cpp/streambuf.h:199: parse error before `mask'
/boot/develop/headers/cpp/streambuf.h: In function `unsetf':
/boot/develop/headers/cpp/streambuf.h:200: `fmtflags' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:200: parse error before `oldbits'
/boot/develop/headers/cpp/streambuf.h:201: `mask' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:201: `oldbits' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:201: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `width':
/boot/develop/headers/cpp/streambuf.h:202: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:203: `val' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: In function `_throw_failure':
/boot/develop/headers/cpp/streambuf.h:208: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:213: `flag' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:215: conflicting types for `setstate'
/boot/develop/headers/posix/stdlib.h:49: previous declaration of `setstate'
/boot/develop/headers/cpp/streambuf.h: In function `good':
/boot/develop/headers/cpp/streambuf.h:217: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:218: invalid operands to binary &
/boot/develop/headers/cpp/streambuf.h:218: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:218: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `fail':
/boot/develop/headers/cpp/streambuf.h:219: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:220: invalid operands to binary &
/boot/develop/headers/cpp/streambuf.h:220: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:220: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `rdstate':
/boot/develop/headers/cpp/streambuf.h:221: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:222: warning: return makes integer
from pointer without a cast
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:223: parse error before `!'
/boot/develop/headers/cpp/streambuf.h: In function `exceptions':
/boot/develop/headers/cpp/streambuf.h:224: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:226: `enable' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:227: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:229: parse error before `*'
/boot/develop/headers/cpp/streambuf.h: In function `rdbuf':
/boot/develop/headers/cpp/streambuf.h:229: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:231: `_old' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:231: `_strbuf' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:231: `_s' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:231: warning: implicit declaration of
function `clear'
/boot/develop/headers/cpp/streambuf.h:231: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:234: conflicting types for
`sync_with_stdio'
/boot/develop/headers/cpp/streambuf.h:233: previous declaration of
`sync_with_stdio'
/boot/develop/headers/cpp/streambuf.h:235: parse error before `bitalloc'
/boot/develop/headers/cpp/streambuf.h:235: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:237: parse error before `&'
/boot/develop/headers/cpp/streambuf.h: In function `pword':
/boot/develop/headers/cpp/streambuf.h:238: warning: empty declaration
/boot/develop/headers/cpp/streambuf.h:239: parse error before `&'
/boot/develop/headers/cpp/streambuf.h:238: parameter name omitted
/boot/develop/headers/cpp/streambuf.h:253: warning: implicit declaration of
function `Init'
/boot/develop/headers/cpp/streambuf.h:253: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:257: parse error before `inline'
/boot/develop/headers/cpp/streambuf.h:257: warning: label `protected'
defined but not used
/boot/develop/headers/cpp/streambuf.h:253: warning: label `public' defined
but not used
/boot/develop/headers/cpp/streambuf.h:260: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:265: parse error before `:'
/boot/develop/headers/cpp/streambuf.h: In function `set_offset':
/boot/develop/headers/cpp/streambuf.h:278: `_pos' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:279: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:283: parse error before `&'
/boot/develop/headers/cpp/streambuf.h:285: parse error before `}'
/boot/develop/headers/cpp/streambuf.h:287: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:289: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:290: parse error before `class'
/boot/develop/headers/cpp/streambuf.h:290: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:291: parse error before `class'
/boot/develop/headers/cpp/streambuf.h:291: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:292: parse error before `&'
/boot/develop/headers/cpp/streambuf.h:295: parse error before `&'
/boot/develop/headers/cpp/streambuf.h: In function `gptr':
/boot/develop/headers/cpp/streambuf.h:299: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:300: `_IO_write_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:300: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `egptr':
/boot/develop/headers/cpp/streambuf.h:302: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:303: `_IO_write_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:303: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `pbase':
/boot/develop/headers/cpp/streambuf.h:304: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:306: `_IO_save_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:306: `_IO_read_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:306: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `base':
/boot/develop/headers/cpp/streambuf.h:307: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:308: `_IO_buf_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:308: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `blen':
/boot/develop/headers/cpp/streambuf.h:309: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:310: `_IO_write_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:310: `c' undeclared (first use in this
function)
/boot/develop/headers/cpp/streambuf.h:310: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:312: redefinition of `xflags'
/boot/develop/headers/cpp/streambuf.h:311: `xflags' previously defined here
/boot/develop/headers/cpp/streambuf.h:315: conflicting types for `xsetflags'
/boot/develop/headers/cpp/streambuf.h:313: previous declaration of
`xsetflags'
/boot/develop/headers/cpp/streambuf.h: In function `gbump':
/boot/develop/headers/cpp/streambuf.h:317: `_IO_save_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:317: `_IO_read_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h: In function `pbump':
/boot/develop/headers/cpp/streambuf.h:318: `_IO_write_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:319: parse error before `='
/boot/develop/headers/cpp/streambuf.h: In function `setp':
/boot/develop/headers/cpp/streambuf.h:321: `_IO_write_base' undeclared
(first use in this function)
/boot/develop/headers/cpp/streambuf.h:321: `_IO_write_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:321: `_IO_write_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h: In function `setg':
/boot/develop/headers/cpp/streambuf.h:323: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:324: `_IO_read_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:324: `_IO_read_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:324: `_IO_read_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h: In function `shortbuf':
/boot/develop/headers/cpp/streambuf.h:325: `_shortbuf' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:325: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `Gbase':
/boot/develop/headers/cpp/streambuf.h:329: `_IO_save_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:329: `_IO_read_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:329: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `eGptr':
/boot/develop/headers/cpp/streambuf.h:331: `_IO_save_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:331: `_IO_read_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:331: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `Bbase':
/boot/develop/headers/cpp/streambuf.h:333: `_IO_read_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:333: `_IO_save_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:333: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `Bptr':
/boot/develop/headers/cpp/streambuf.h:334: `_IO_backup_base' undeclared
(first use in this function)
/boot/develop/headers/cpp/streambuf.h:334: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `eBptr':
/boot/develop/headers/cpp/streambuf.h:336: `_IO_read_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:336: `_IO_save_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:336: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `Nbase':
/boot/develop/headers/cpp/streambuf.h:337: `_IO_save_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:337: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `eNptr':
/boot/develop/headers/cpp/streambuf.h:338: `_IO_save_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:338: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `have_backup':
/boot/develop/headers/cpp/streambuf.h:339: `_IO_save_base' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:339: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `have_markers':
/boot/develop/headers/cpp/streambuf.h:340: `_markers' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:340: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:346: parse error before `='
/boot/develop/headers/cpp/streambuf.h:346: `streambuf' redeclared as
different kind of symbol
/boot/develop/headers/cpp/streambuf.h:67: previous declaration of
`streambuf'
/boot/develop/headers/cpp/streambuf.h:346: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:347: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:350: parse error before `~'
/boot/develop/headers/cpp/streambuf.h:351: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:351: parse error before `='
/boot/develop/headers/cpp/streambuf.h:352: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:353: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:354: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:356: syntax error before `streamsize'
/boot/develop/headers/cpp/streambuf.h:357: syntax error before `streamsize'
/boot/develop/headers/cpp/streambuf.h:358: syntax error before `streampos'
/boot/develop/headers/cpp/streambuf.h:358: parse error before `_seek_dir'
/boot/develop/headers/cpp/streambuf.h:359: syntax error before `streampos'
/boot/develop/headers/cpp/streambuf.h:359: parse error before `='
/boot/develop/headers/cpp/streambuf.h:361: parse error before `_seek_dir'
/boot/develop/headers/cpp/streambuf.h: In function `pubseekoff':
/boot/develop/headers/cpp/streambuf.h:362: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:362: `o' undeclared (first use in this
function)
/boot/develop/headers/cpp/streambuf.h:362: `d' undeclared (first use in this
function)
/boot/develop/headers/cpp/streambuf.h:362: `mode' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:363: parse error before `='
/boot/develop/headers/cpp/streambuf.h: In function `pubseekpos':
/boot/develop/headers/cpp/streambuf.h:364: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:364: `pos' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:364: `mode' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:365: parse error before `_seek_dir'
/boot/develop/headers/cpp/streambuf.h:366: parse error before `='
/boot/develop/headers/cpp/streambuf.h:367: parse error before `streambuf'
/boot/develop/headers/cpp/streambuf.h:367: conflicting types for `setbuf'
/boot/develop/headers/posix/stdio.h:106: previous declaration of `setbuf'
/boot/develop/headers/cpp/streambuf.h:367: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:368: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:369: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:371: parse error before `&'
/boot/develop/headers/cpp/streambuf.h:377: conflicting types for
`unbuffered'
/boot/develop/headers/cpp/streambuf.h:374: previous declaration of
`unbuffered'
/boot/develop/headers/cpp/streambuf.h:379: conflicting types for
`linebuffered'
/boot/develop/headers/cpp/streambuf.h:375: previous declaration of
`linebuffered'
/boot/develop/headers/cpp/streambuf.h: In function `allocate':
/boot/develop/headers/cpp/streambuf.h:381: too few arguments to function
`unbuffered'
/boot/develop/headers/cpp/streambuf.h:381: void value not ignored as it
ought to be
/boot/develop/headers/cpp/streambuf.h: In function `allocbuf':
/boot/develop/headers/cpp/streambuf.h:384: warning: implicit declaration of
function `doallocbuf'
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:385: warning: type mismatch with
previous implicit declaration
/boot/develop/headers/cpp/streambuf.h:384: warning: previous implicit
declaration of `doallocbuf'
/boot/develop/headers/cpp/streambuf.h:385: warning: `doallocbuf' was
previously implicitly declared to return `int'
/boot/develop/headers/cpp/streambuf.h: In function `in_avail':
/boot/develop/headers/cpp/streambuf.h:386: `_IO_read_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:386: `_IO_read_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:386: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `out_waiting':
/boot/develop/headers/cpp/streambuf.h:387: `_IO_write_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:387: `_IO_write_base' undeclared
(first use in this function)
/boot/develop/headers/cpp/streambuf.h:387: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `padn':
/boot/develop/headers/cpp/streambuf.h:389: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: In function `sgetn':
/boot/develop/headers/cpp/streambuf.h:390: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: In function `sputc':
/boot/develop/headers/cpp/streambuf.h:395: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: In function `sbumpc':
/boot/develop/headers/cpp/streambuf.h:396: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h: In function `sgetc':
/boot/develop/headers/cpp/streambuf.h:397: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:397: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: In function `snextc':
/boot/develop/headers/cpp/streambuf.h:399: `_IO_read_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:399: `_IO_read_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:399: `this' undeclared (first use in
this function)
/boot/develop/headers/cpp/streambuf.h:401: warning: left-hand operand of
comma expression has no effect
/boot/develop/headers/cpp/streambuf.h: In function `stossc':
/boot/develop/headers/cpp/streambuf.h:402: `_IO_read_ptr' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h:402: `_IO_read_end' undeclared (first
use in this function)
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:403: parse error before `ios'
/boot/develop/headers/cpp/streambuf.h:404: parse error before `...'
/boot/develop/headers/cpp/streambuf.h:406: parse error before `...'
/boot/develop/headers/cpp/streambuf.h:411: syntax error before `streamsize'
/boot/develop/headers/cpp/streambuf.h:412: syntax error before `streamsize'
/boot/develop/headers/cpp/streambuf.h:413: syntax error before `streampos'
/boot/develop/headers/cpp/streambuf.h:413: parse error before `_seek_dir'
/boot/develop/headers/cpp/streambuf.h:414: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:415: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:417: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:418: syntax error before `void'
/boot/develop/headers/cpp/streambuf.h:420: parse error before `}'
/boot/develop/headers/cpp/streambuf.h:425: parse error before `filebuf'
/boot/develop/headers/cpp/streambuf.h:430: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:431: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:432: conflicting types for `filebuf'
/boot/develop/headers/cpp/streambuf.h:431: previous declaration of `filebuf'
/boot/develop/headers/cpp/streambuf.h:432: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:436: parse error before `~'
/boot/develop/headers/cpp/streambuf.h:437: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:438: parse error before `*'
/boot/develop/headers/cpp/streambuf.h:438: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:439: parse error before `*'
/boot/develop/headers/cpp/streambuf.h:439: parse error before `ios'
/boot/develop/headers/cpp/streambuf.h:439: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:440: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:441: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:441: parse error before `='
/boot/develop/headers/cpp/streambuf.h: In function `is_open':
/boot/develop/headers/cpp/streambuf.h:442: parse error before `{'
/boot/develop/headers/cpp/streambuf.h:443: `_fileno' undeclared (first use
in this function)
/boot/develop/headers/cpp/streambuf.h:443: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:444: parse error before `*'
/boot/develop/headers/cpp/streambuf.h:444: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:445: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:446: syntax error before `streampos'
/boot/develop/headers/cpp/streambuf.h:446: parse error before `_seek_dir'
/boot/develop/headers/cpp/streambuf.h:447: parse error before `streambuf'
/boot/develop/headers/cpp/streambuf.h:447: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:450: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:451: parse error before `:'
/boot/develop/headers/cpp/streambuf.h: In function `cur_ptr':
/boot/develop/headers/cpp/streambuf.h:454: warning: implicit declaration of
function `is_reading'
/boot/develop/headers/cpp/streambuf.h:454: warning: implicit declaration of
function `pptr'
/boot/develop/headers/cpp/streambuf.h:454: warning: pointer/integer type
mismatch in conditional expression
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:458: syntax error before `streamsize'
/boot/develop/headers/cpp/streambuf.h:459: syntax error before `streampos'
/boot/develop/headers/cpp/streambuf.h:459: parse error before `_seek_dir'
/boot/develop/headers/cpp/streambuf.h:460: syntax error before `streamsize'
/boot/develop/headers/cpp/streambuf.h:461: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:462: syntax error before `int'
/boot/develop/headers/cpp/streambuf.h:467: parse error before `}'
/boot/develop/headers/cpp/streambuf.h:469: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:470: conflicting types for
`_exceptions'
/boot/develop/headers/cpp/streambuf.h:93: previous declaration of
`_exceptions'
/boot/develop/headers/cpp/streambuf.h:470: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:471: `_strbuf' used prior to
declaration
/boot/develop/headers/cpp/streambuf.h:471: `sb' undeclared here (not in a
function)
/boot/develop/headers/cpp/streambuf.h:471: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:471: conflicting types for `_tie'
/boot/develop/headers/cpp/streambuf.h:88: previous declaration of `_tie'
/boot/develop/headers/cpp/streambuf.h:471: `tie_to' undeclared here (not in
a function)
/boot/develop/headers/cpp/streambuf.h:471: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:471: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:471: conflicting types for `_fill'
/boot/develop/headers/cpp/streambuf.h:91: previous declaration of `_fill'
/boot/develop/headers/cpp/streambuf.h:471: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:473: conflicting types for `_flags'
/boot/develop/headers/cpp/streambuf.h:90: previous declaration of `_flags'
/boot/develop/headers/cpp/streambuf.h:473: warning: initialization makes
integer from pointer without a cast
/boot/develop/headers/cpp/streambuf.h:473: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:477: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:477: conflicting types for `_arrays'
/boot/develop/headers/cpp/streambuf.h:96: previous declaration of `_arrays'
/boot/develop/headers/cpp/streambuf.h:477: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/streambuf.h:477: parse error before `}'
/boot/develop/headers/cpp/streambuf.h:479: parse error before `:'
/boot/develop/headers/cpp/streambuf.h:481: parse error before `:'
In file included from /boot/develop/headers/cpp/fstream.h:30,
                 from
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c:4:
/boot/develop/headers/cpp/iostream.h:34: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/iostream.h:35: parse error before `&'
/boot/develop/headers/cpp/iostream.h:36: parse error before `&'
/boot/develop/headers/cpp/iostream.h:37: parse error before `&'
/boot/develop/headers/cpp/iostream.h:39: parse error before `&'
/boot/develop/headers/cpp/iostream.h:40: parse error before `&'
/boot/develop/headers/cpp/iostream.h:41: parse error before `&'
/boot/develop/headers/cpp/iostream.h:42: parse error before `&'
/boot/develop/headers/cpp/iostream.h:50: parse error before `*'
/boot/develop/headers/cpp/iostream.h: In function `opfx':
/boot/develop/headers/cpp/iostream.h:53: invalid type argument of `->'
/boot/develop/headers/cpp/iostream.h: In function `osfx':
/boot/develop/headers/cpp/iostream.h:55: parse error before `:'
/boot/develop/headers/cpp/iostream.h:56: warning: implicit declaration of
function `do_osfx'
/boot/develop/headers/cpp/iostream.h: At top level:
/boot/develop/headers/cpp/iostream.h:57: parse error before `&'
/boot/develop/headers/cpp/iostream.h:74: parse error before `&'
/boot/develop/headers/cpp/iostream.h:91: parse error before `&'
/boot/develop/headers/cpp/iostream.h:92: parse error before `&'
/boot/develop/headers/cpp/iostream.h:114: parse error before `istream'
/boot/develop/headers/cpp/iostream.h:121: parse error before `:'
/boot/develop/headers/cpp/iostream.h:123: parse error before `*'
/boot/develop/headers/cpp/iostream.h:146: parse error before `='
/boot/develop/headers/cpp/iostream.h: In function `ipfx':
/boot/develop/headers/cpp/iostream.h:147: warning: implicit declaration of
function `set'
/boot/develop/headers/cpp/iostream.h:147: parse error before `:'
/boot/develop/headers/cpp/iostream.h:150: `need' undeclared (first use in
this function)
/boot/develop/headers/cpp/iostream.h:150: request for member `in_avail' in
something not a structure or union
/boot/develop/headers/cpp/iostream.h:150: invalid type argument of `->'
/boot/develop/headers/cpp/iostream.h:151: invalid operands to binary &
/boot/develop/headers/cpp/iostream.h:151: parse error before `:'
/boot/develop/headers/cpp/iostream.h: In function `ipfx0':
/boot/develop/headers/cpp/iostream.h:156: parse error before `:'
/boot/develop/headers/cpp/iostream.h:159: invalid type argument of `->'
/boot/develop/headers/cpp/iostream.h:160: invalid operands to binary &
/boot/develop/headers/cpp/iostream.h:160: parse error before `:'
/boot/develop/headers/cpp/iostream.h:163: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/iostream.h: In function `ipfx1':
/boot/develop/headers/cpp/iostream.h:165: parse error before `:'
/boot/develop/headers/cpp/iostream.h:168: request for member `in_avail' in
something not a structure or union
/boot/develop/headers/cpp/iostream.h:168: invalid type argument of `->'
/boot/develop/headers/cpp/iostream.h: In function `get':
/boot/develop/headers/cpp/iostream.h:174: invalid type argument of `->'
/boot/develop/headers/cpp/iostream.h:175: parse error before `:'
/boot/develop/headers/cpp/iostream.h: In function `gcount':
/boot/develop/headers/cpp/iostream.h:179: `_gcount' undeclared (first use in
this function)
/boot/develop/headers/cpp/iostream.h:179: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/iostream.h: At top level:
/boot/develop/headers/cpp/iostream.h:180: parse error before `&'
/boot/develop/headers/cpp/iostream.h:182: parse error before `&'
/boot/develop/headers/cpp/iostream.h:185: parse error before `&'
/boot/develop/headers/cpp/iostream.h:208: parse error before `&'
/boot/develop/headers/cpp/iostream.h:209: parse error before `&'
/boot/develop/headers/cpp/iostream.h:226: parse error before `iostream'
/boot/develop/headers/cpp/iostream.h:230: parse error before `*'
/boot/develop/headers/cpp/iostream.h:233: parse error before
`_IO_istream_withassign'
/boot/develop/headers/cpp/iostream.h:240: parse error before
`_IO_ostream_withassign'
/boot/develop/headers/cpp/iostream.h:247: parse error before `cin'
/boot/develop/headers/cpp/iostream.h:247: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/iostream.h:249: parse error before `cout'
/boot/develop/headers/cpp/iostream.h:249: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/iostream.h:251: parse error before `clog'
/boot/develop/headers/cpp/iostream.h:255: warning: data definition has no
type or storage class
/boot/develop/headers/cpp/iostream.h:257: parse error before `&'
/boot/develop/headers/cpp/iostream.h:258: parse error before `&'
/boot/develop/headers/cpp/iostream.h:259: parse error before `&'
/boot/develop/headers/cpp/iostream.h:260: parse error before `&'
/boot/develop/headers/cpp/iostream.h:264: parse error before `&'
/boot/develop/headers/cpp/iostream.h:266: parse error before `&'
/boot/develop/headers/cpp/iostream.h:268: parse error before `&'
In file included from
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c:4:
/boot/develop/headers/cpp/fstream.h:38: parse error before `:'
/boot/develop/headers/cpp/fstream.h:40: warning: data definition has no type
or storage class
/boot/develop/headers/cpp/fstream.h:41: conflicting types for `fstreambase'
/boot/develop/headers/cpp/fstream.h:40: previous declaration of
`fstreambase'
/boot/develop/headers/cpp/fstream.h:41: warning: data definition has no type
or storage class
/boot/develop/headers/cpp/fstream.h:42: parse error before `='
/boot/develop/headers/cpp/fstream.h:42: warning: data definition has no type
or storage class
/boot/develop/headers/cpp/fstream.h:43: conflicting types for `close'
/boot/develop/headers/cpp/streambuf.h:444: previous declaration of `close'
/boot/develop/headers/cpp/fstream.h:45: parse error before `*'
/boot/develop/headers/cpp/fstream.h:45: redefinition of `rdbuf'
/boot/develop/headers/cpp/streambuf.h:229: `rdbuf' previously defined here
/boot/develop/headers/cpp/fstream.h: In function `rdbuf':
/boot/develop/headers/cpp/fstream.h:45: parse error before `{'
/boot/develop/headers/cpp/fstream.h:50: request for member `is_open' in
something not a structure or union
/boot/develop/headers/cpp/fstream.h:50: warning: control reaches end of
non-void function
/boot/develop/headers/cpp/fstream.h: At top level:
/boot/develop/headers/cpp/fstream.h:51: conflicting types for `setbuf'
/boot/develop/headers/cpp/streambuf.h:447: previous declaration of `setbuf'
/boot/develop/headers/cpp/fstream.h: In function `setbuf':
/boot/develop/headers/cpp/fstream.h:51: request for member `setbuf' in
something not a structure or union
/boot/develop/headers/cpp/fstream.h: At top level:
/boot/develop/headers/cpp/fstream.h:52: conflicting types for `attach'
/boot/develop/headers/cpp/streambuf.h:437: previous declaration of `attach'
/boot/develop/headers/cpp/fstream.h:57: parse error before `}'
/boot/develop/headers/cpp/fstream.h:59: parse error before `ifstream'
/boot/develop/headers/cpp/fstream.h:62: parse error before `:'
/boot/develop/headers/cpp/fstream.h:63: parse error before `:'
/boot/develop/headers/cpp/fstream.h:64: parse error before `='
/boot/develop/headers/cpp/fstream.h:66: parse error before `='
/boot/develop/headers/cpp/fstream.h:67: conflicting types for `open'
/boot/develop/headers/cpp/streambuf.h:439: previous declaration of `open'
/boot/develop/headers/cpp/fstream.h: In function `open':
/boot/develop/headers/cpp/fstream.h:67: parse error before `:'
/boot/develop/headers/cpp/fstream.h:67: warning: label `fstreambase' defined
but not used
/boot/develop/headers/cpp/fstream.h: At top level:
/boot/develop/headers/cpp/fstream.h:70: parse error before `ofstream'
/boot/develop/headers/cpp/fstream.h:73: parse error before `:'
/boot/develop/headers/cpp/fstream.h:74: parse error before `:'
/boot/develop/headers/cpp/fstream.h:75: parse error before `='
/boot/develop/headers/cpp/fstream.h:77: parse error before `='
/boot/develop/headers/cpp/fstream.h:78: redefinition of `open'
/boot/develop/headers/cpp/fstream.h:67: `open' previously defined here
/boot/develop/headers/cpp/fstream.h: In function `open':
/boot/develop/headers/cpp/fstream.h:78: parse error before `:'
/boot/develop/headers/cpp/fstream.h:78: warning: label `fstreambase' defined
but not used
/boot/develop/headers/cpp/fstream.h: At top level:
/boot/develop/headers/cpp/fstream.h:81: parse error before `fstream'
/boot/develop/headers/cpp/fstream.h:84: parse error before `:'
/boot/develop/headers/cpp/fstream.h:85: parse error before `='
/boot/develop/headers/cpp/fstream.h:87: parse error before `:'
/boot/develop/headers/cpp/fstream.h:88: parse error before `='
/boot/develop/headers/cpp/fstream.h:89: redefinition of `open'
/boot/develop/headers/cpp/fstream.h:78: `open' previously defined here
/boot/develop/headers/cpp/fstream.h: In function `open':
/boot/develop/headers/cpp/fstream.h:89: parse error before `:'
/boot/develop/headers/cpp/fstream.h:89: warning: label `fstreambase' defined
but not used
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c: In function
`SDL_LoadPNG':
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c:29: warning:
variable `surface' might be clobbered by `longjmp' or `vfork'
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c:35: warning:
variable `rowPointers' might be clobbered by `longjmp' or `vfork'
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c: In function
`PNGLoad':
/boot/home/Desktop/MyProjects/VivendasFootball/sources/png.c:206: warning:
passing arg 1 of `SDL_LoadPNG' from incompatible pointer type
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:236: warning: `xalloc' declared
`static' but never defined
/boot/develop/headers/cpp/streambuf.h:349: warning: `flush_all_linebuffered'
declared `static' but never defined
make: *** [obj.x86/png.o] Error 1
-----------------------------------------error.txt
end-------------------------------------------------------------------------
---------
ho scoperto che il problema non è del codice xche anche con altri programmi
che usano il header fstream.h non funziona....

 type or storage class
In questi casi, la prima cosa da fare è esaminare il contenuto del
sorgente dopo che è stato elaborato dal preprocessore.
   g++ -E  ...  > /tmp/tmp.cpp
 
Max


funziona anche con il gcc??lo so che il gcc e per il C e questo newsgroup
parla di C++, ma avevo postato nel it.comp.lang.c e mi hanno risposto:  BeOS
== C++
cosa sono i tre puntini???il mio file source?????e cosa fa l'opzione -E ???
grazie e ciao!!

 
Scusa se non sono stato sufficientemente esplicito. I tre puntini
starebbero per tuttta la serie di opzioni e argomenti che usi per (cercare
di) compilare il file in questione. -E fa sì che g++ si limiti a
includere i vari file ed espandere le macro, così puoi avere un idea più
chiara di cosa sta succedendo.
Max

diavolo c'entra il C?
forse e proprio questo che sbaglio?? sara che non funziona xche io uso il
gcc???il gcc compila anche codice c++??
non sono uno esperto, sto ancora imparando......8)..........grazie!!!adesso
provero con il g++
ciao!!


ha funzionato!!!!! pero adesso ho nuovi problemi....questa volta non mentre
compila tutto ma mentre fa il link...........primo mi dice che ho dichiarato
piu di una volta la stessa cosa....come se avesse fato:
int CIAO;
int CIAO;
e questo penso che dipenda dal fato che tutti i miei sorgenti hanno uno
stesso header in comune che dichiara le variabili.....e questo non so come
risolvere....ho provato a metere un:
#ifndef _MAIN_H
#define _MAIN_H
ma non funziona lo stesso........
il secondo problema non penso che mi potete aiutare in questo
ng.......chiedero al ng comp.sys.be.programmer.......grazie cmq.....ciao!!!!

 risolvere....ho provato a mettere un:
Quelle non sono dichiarazioni, o meglio: non sono *solo* dichiarazioni,
sono anche definizioni. Soluzioni possibili:
  1. metti le definizioni in un file .cpp e *dichiari* le variabili
   in un .h usando la keyword extern:
    extern int CIAO;
  2. eviti tout-court il ricorso a variabili globali.
Consiglio la 2.
Max


 stesso header in comune che dichiara le variabili.....
Le variabili probabilmente non le hai solo dichiarate nel file header ma
anche definite. Le dichiarazioni si fanno premettendo la keyword extern
al tipo della variabile. Naturalmente per ognuna deve anche essere
presente una ed una sola definizione.
EMG

>  2. eviti tout-court il ricorso a variabili globali.
grazie!!!!!

ciao!!
per quel che ne so io, g++ è solo un'alias che chiama gcc con le opzioni giuste
per compilare in C++


puo darsi...non sono un'esperto, ma almeno chiamando il g++ al posto del gcc
ha funzionato e mi ha compilato i sorgenti....
ciao!!!