|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hmm...is there really no way of modifying an entire struct, as opposed to having to use each element?
E.g. Code:
struct {
int a, b;
} foo;
...
foo = {2,4};
|
| Sponsored Links |
|
|
|
|||
|
Quote:
You CAN however do struct assignments, as with struct Foo { int a, b; }; Foo Zero = {0,0}; //struct initialization Foo Junk; then later on, Junk = Zero; //struct assignment |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Struct in C and C++ | dirkfirst | C and C++ | 9 | 03-05-2008 06:28 AM |
| [C]Functions Help! | mtber | C and C++ | 1 | 12-05-2007 09:25 AM |
| Big O notation | shinta | General Programming | 2 | 11-18-2007 11:36 AM |
| sizeof Struct | Eagle_ | C and C++ | 2 | 11-18-2007 11:15 AM |
| 'BigOh' Notation | DansTransAM | General Programming | 3 | 09-14-2006 12:56 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |