|
|
|
struct + case
|
|||
|---|---|---|---|
|
#18+
Privet Vsem, ia znaiu cito v C mojno obieviti structuru kotoraia vkliucaet case, no ne pomniu kak eto pisetsea, MSDN pod rukoi net. doljno biti citoto tipa: struct STest { int a; int b; switch(int i) { case 1: double c; case 2: int d; } } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2004, 11:49 |
|
||
|
struct + case
|
|||
|---|---|---|---|
|
#18+
>ia znaiu cito v C mojno obieviti structuru kotoraia vkliucaet case, no ne pomniu kak eto pisetsea низя struct xx { int type; union u { double c; int d; } } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2004, 12:03 |
|
||
|
struct + case
|
|||
|---|---|---|---|
|
#18+
угу я тоже видел только с union а может мне кто обьяснить как происходит работа с этим ? ш (';') (V),(V),, Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2004, 12:14 |
|
||
|
struct + case
|
|||
|---|---|---|---|
|
#18+
toesti, struct xx { ... variables int type; union u { struct { ... // type 1 } a1; struct { ... // type 2 }a1; } } i v zavisimosti ot type rabotati ?, a razve srazu net ? pomoemu gdeto videl ia takoe ... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2004, 12:22 |
|
||
|
struct + case
|
|||
|---|---|---|---|
|
#18+
#include <string> .... using namespace std; struct STest { long a; char b; long c; string d; union { string e; double f; }; }; takoe ne prohodit dlia tipa string, kak mojno po drugomu resiti ? poiavleaetsea osibka error C2621 - e has copy constructor ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2004, 12:37 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=435&tid=2034493]: |
0ms |
get settings: |
7ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
31ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
38ms |
get tp. blocked users: |
1ms |
| others: | 200ms |
| total: | 311ms |

| 0 / 0 |
