Data Structs

Data Structs in C++

Page 1 of 1

2 Replies - 686 Views - Last Post: 12 July 2009 - 09:26 AM Rate Topic: -----

#1 Diego Gomes  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 7
  • Joined: 06-July 09

Data Structs

Post icon  Posted 12 July 2009 - 08:29 AM

How can I do Data Structs in C++? I know do it in C. Can I use Classes to do it?
Is This A Good Question/Topic? 0
  • +

Replies To: Data Structs

#2 apw5020  Icon User is offline

  • D.I.C Addict

Reputation: 78
  • View blog
  • Posts: 666
  • Joined: 26-March 09

Re: Data Structs

Posted 12 July 2009 - 09:19 AM

[rules][/rules]

Aside from that, please be more specific.

This post has been edited by apw5020: 12 July 2009 - 09:20 AM

Was This Post Helpful? 0
  • +
  • -

#3 NickDMax  Icon User is online

  • Can grep dead trees!
  • member icon

Reputation: 2246
  • View blog
  • Posts: 9,235
  • Joined: 18-February 07

Re: Data Structs

Posted 12 July 2009 - 09:26 AM

Quote

Aside from that, please be more specific.
-- indeed.

At a high level, anything you can do in C you can do in C++ - in C++ a struct is just a spacial class with all elements public. So in general the answer might be: "Just as you did them in C -- but now you can encapsulate methods for manipulating the structure to within the class."
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1