data structure examples

This is a discussion on data structure examples within the C++ Programming forums, part of the General Programming Boards category; Anyone have any good URLs where I can go and learn more about data structures? I need to write a ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    21

    data structure examples

    Anyone have any good URLs where I can go and learn more about data structures? I need to write a program that creates a data structure, accepts user input and stores in the data structure and outputs to screen.

    I have been searching on the net and havn't found any good sites.

    Thanks,
    Jose

  2. #2
    Registered User Dr. Bebop's Avatar
    Join Date
    Sep 2002
    Posts
    96
    I like this one. What data structure are you supposed to be using? There are a bunch.
    Processing error: Stupidity detected.
    ------------------------------
    Dr. Bebop
    Windows XP Professional Ed.
    Microsoft Visual Studio 6

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    21
    I am not sure. I took a C programming class in summer school and the instructor flew through data structures and this semester I am taking a C++ class and am on an assignment where we have to write a program that accept one user input for pizza company name, diameter of pizza, weight of pizza and display on screen.

  4. #4
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Does not sound like you need to use a data structure in this problem.

    Mr. C.

  5. #5
    Registered User Dr. Bebop's Avatar
    Join Date
    Sep 2002
    Posts
    96
    I disagree, an array would be a good data structure to use if you aren't allowed to use the string class.
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
            char company[1024];
    
            cout<< "Enter the name of the pizza company: ";
            cin.getline( company, '\n' );
            cout<< "You entered " << company <<endl;
    
            return 0;
    }
    Processing error: Stupidity detected.
    ------------------------------
    Dr. Bebop
    Windows XP Professional Ed.
    Microsoft Visual Studio 6

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. pthread question how would I init this data structure?
    By mr_coffee in forum C Programming
    Replies: 2
    Last Post: 02-23-2009, 11:42 AM
  2. Data structure question.
    By ronenk in forum C Programming
    Replies: 9
    Last Post: 10-03-2004, 10:58 AM
  3. Appropriate data structure
    By gazsux in forum Game Programming
    Replies: 3
    Last Post: 03-19-2003, 12:26 PM
  4. C Programming Question
    By TK in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 07-04-2002, 07:11 PM
  5. Dynamic Data Structure -- Which one is better?
    By Yin in forum C++ Programming
    Replies: 0
    Last Post: 04-10-2002, 11:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21