Article View: pl.comp.objects
Article #5188case x: ..=new
From: Michał Kudła
Date: Mon, 15 Mar 1999 09:22
Date: Mon, 15 Mar 1999 09:22
40 lines
1419 bytes
1419 bytes
Nie rozumiem
Oto taki sobie przykład
#include <iostream>
struct str1
{
int a, b, d;
};
int main()
{
char *napis = "Michał";
int i = 5;
switch (i)
{
case 1:
str1 *s = new str1;
cout << napis;
break;
case 5:
cout << "ekstra";
break;
}
}
generuje coś takiego
tswitch.cpp: In function `int main()':
tswitch.cpp:17: jump to case label
tswitch.cpp:14: crosses initialization of `struct str1 * s'
Kompiluję EGCSem v.1.1
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
--
* o o o o o o * Michał Kudła (Amiga C++ programer )
* o o o o o o o * mailto: miko@kiux.man.radom.pl
* o o o o o o o * or miko@student.man.radom.pl
* o o o o o o * http://student.man.radom.pl/~miko
Technical Details
Message-ID:
<Pine.LNX.3.96.990315111232.13615C-100000@student.man.radom.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!ict.pwr.wroc.pl!m2n-gate.okapi.usenet.plShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!ict.pwr.wroc.pl!m2n-gate.okapi.usenet.pl From: Michał Kudła <miko@student.man.radom.pl> Newsgroups: pl.comp.objects Subject: case x: ..=new Message-ID: <Pine.LNX.3.96.990315111232.13615C-100000@student.man.radom.pl> Date: 15 Mar 99 09:22:01 GMT Sender: objects@sprocket.ict.pwr.wroc.pl Organization: Lista dyskusyjna objects@sprocket.ict.pwr.wroc.pl Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit