Difference between revisions of "CPP/Struct"

From ProgrammingExamples
< CPP
Jump to: navigation, search
(Created page with '==Struct.cpp== <source lang="cpp"> #include <iostream> struct Card { int id; }; int main (int argc, char *argv[]) { Card c; c.id = 3; return 0; } </source>')
(No difference)

Revision as of 09:14, 23 June 2010

Struct.cpp

#include <iostream>
 
struct Card
{
  int id;
};
 
int main (int argc, char *argv[])
{
  Card c;
  c.id = 3;
 
  return 0;
}