Ubuntu Forums Archive Viewer

A newbie is about to explode(c++)

Archived thread 1000260 from New to Ubuntu. Markdown source: New_to_Ubuntu/thread_1000260_A_newbie_is_about_to_explode(c++).md

Original URL About this archive
#1

I know this isn't a subject for ubuntu forums but I'm about to explode ](*,) . I'm trying to find a solution but nothing. pls help

this is the code. What should i put into the $$$$. I know is char something but WHAT...


#include<iostream>
#include<string>
using namespace std;

class employee
{
  private:
    char name[20];
    char id[5];
  public:
    employee($$$$$,$$$$$); //constructor
};

void main()
{
  employee em1($$$$$$,$$$$$$); //constructor
  .
  .
  .
}

employee::employee($$$$$$,$$$$$$$)
{
  strcpy(name,$$$$$$);
  strcpy(id,$$$$$$$);
}

If you are really quit you'll be able to hear me (boom!!!)

#2

What do you want to accomplish with this program?

#3

Just to pass from the main, em1("name","id"), the name and the id in the class em1. But how?

Use the overload constructor to pass the values.

#4

(There's a full subforum named Development & Programming, by the way. Whine whine nag!)

#5

Here's the Programming talk forum: http://ubuntuforums.org/forumdisplay.php?f=39

You have better chances of getting help there.

#6

Closed this. Duplicate here: http://ubuntuforums.org/showthread.php?p=6296918#post6296918

Please do not create duplicate threads. Use the report post button and we can move it for you.

Thank you.