[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

global typedef

Asked by nozzle99 in C++ Programming Language

Tags: global

I try to make a linked list class for my school project and got some problem with typedef thing.


MY HEADER FILE LOOKS LIKE (list.h):

struct node;
struct dataTypeList;
typedef dataTypeList itemListType;

class list
{
  public:
    list();
    ~list();
    void getItem(itemListType &newItem);

...
};


MY CPP FOR THE HEADER FILE (list.cc):

include "list.h"

struct node
{
   ...
};

struct dataTypeList
{
   int value;
   int multiple;
};

...


MY PROGRAM FILE (try.cc):

include "list.h"

struct dataTypeList
{
   int value;
   int multiple;
};
...

the problem is: do I have to put the struct statement in both class (my program class and class implementation for my header file). I need to make 2 different programs which will use that linked list container, the first program will use that struct while the data for the other only an integer. If I put the struct in the list.cc, my second program will be nasty because I have to use that struct while I don;t need it.

is there any way I can make the itemListType in list.h to be default to int (ie. typedef int itemListType). And if I declare the typedef in try.cc (ie. typedef dataListType itemListType), the itemListType in list.h and list.cc will be dataListType (but I don't want to declare the struct in the list.cc)?

BTW, I'm using CC compiler for unix.

 
Related Solutions
 
Loading Advertisement...
 
[+][-]04/25/00 05:49 PM, ID: 2749789Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/25/00 06:21 PM, ID: 2749839Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/26/00 05:41 AM, ID: 2751118Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/26/00 05:43 AM, ID: 2751126Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/26/00 05:44 AM, ID: 2751129Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/26/00 05:52 AM, ID: 2751168Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/26/00 04:28 PM, ID: 2753468Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/26/00 04:40 PM, ID: 2753492Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/26/00 06:35 PM, ID: 2753738Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/27/00 06:01 PM, ID: 2757757Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/27/00 06:24 PM, ID: 2757804Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/28/00 04:20 AM, ID: 2758825Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: C++ Programming Language
Tags: global
Sign Up Now!
Solution Provided By: nietod
Participating Experts: 3
Solution Grade: B
 
[+][-]04/30/00 09:27 PM, ID: 2765117Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81