Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jd1pek

  1. jd1pek

    Help with classes and structs...

    Ok, i messed up in my actual code i wasn't initializing the counter variable so it was garbage and wouldn't work. Thank you soooo much for all of your input you have solved my problem! THANK YOU!
  2. jd1pek

    Help with classes and structs...

    I am still getting a segmentation fault when it trys to do to: strcpy(new_struct[keep_count].name,my_ex_struct.name);
  3. jd1pek

    Help with classes and structs...

    That looks like what i am trying to do but isn't new_struct private so i won't have access to it? I am going to try it.
  4. jd1pek

    Help with classes and structs...

    ok, it is now making it to the following function: int ex_class::add(const ex_struct &my_ex_struct) { ... } but how would i add something to the array something like this: // This would be inside of the add member function strcpy(my_fav[keep_count].name,my_ex_struct.name)...
  5. jd1pek

    Help with classes and structs...

    I need help on how to have access to my variables when inside of the ex_class.add() function. struct ex_struct { char name[21]; int num; .... }; class ex_class { public: ex_class(); int display_all(); int add(const ex_struct &); private: ex_struct new_struct[101]...

Part and Inventory Search

Back
Top