HELP! user-defined data types 
Author Message
 HELP! user-defined data types

I am taking a home correspondence course in computer programming and I
do not  understand my text book on user defined data structures or data
types. Could somebody please help me with some information and/or
examples in c? Pascal and Visual Basic info. and/or examples would be
appreciated but not expected. Thank you



Sat, 11 Nov 2000 03:00:00 GMT  
 HELP! user-defined data types

What is it you don't understand?

--
Increase the Peace!
Charles LaCour

Quote:

>I am taking a home correspondence course in computer programming and I
>do not  understand my text book on user defined data structures or data
>types. Could somebody please help me with some information and/or
>examples in c? Pascal and Visual Basic info. and/or examples would be
>appreciated but not expected. Thank you



Sun, 12 Nov 2000 03:00:00 GMT  
 HELP! user-defined data types

Quote:

> I am taking a home correspondence course in computer programming and I
> do not  understand my text book on user defined data structures or data
> types. Could somebody please help me with some information and/or
> examples in c?

Hi Trish Minor,

Please try to be a bit more specific concerning what you want to
know and where your problems are. Maybe you could even try to
formulate a code sample to illustrate your problem.

Here is an example of a data structure in C:
  struct address {
    char name[100];
    int age;
    unsigned long amountOfMoneyYouOwnMe;
  }

In this is how you declare a variable of that type and assign some
values to them:
  int main( void )
  {
     struct address someGuy;

     someGuy.age = 42;
     someGuy.amountOfMoneyYouOwnMe = 4711;
     strcpy( someGuy.name, "Marvin" );

     return 0;
  }

Stephan
(initiator of the campaign against grumpiness in c.l.c)



Sun, 12 Nov 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing User defined data Type in ATL

2. Returning user defined data types

3. User Defined Data Types and Pointers

4. Interface returns user defined type???

5. Convert C++ (return type int, long, user-define, etc) function into COM/ATL

6. User defined Type in ATL

7. User defined types

8. Use of enums for user defined types

9. User Defined Type -Symbol Info

10. template user defined type conversion

11. Passing a user defined type to a DLL

12. List STL container with user defined types

 

 
Powered by phpBB® Forum Software