Hi all..
i am doing myC++ assignment and i got problem in adding, deleting, and modify records.
It should be some problem, but i dunno what's wrong. can somebody give me some tips for doing this ?
THanks

What? You need to show some code so we can see what your problem is.

elements of an array are not called "records". A record is something you play on a phonograph machine, history of your activities in prison, or a complete collection of data in a file.

I'm not 100% adept with c/c++ - but...

as you've posted no code - i'll hazard a guess:

- You need to create the type


struct my_record
{
/* your data types


*/
};

- Then make a variable of it


struct my_rec my_var[100]

/* obviously determine how many you want in an array */

Then again i'm not 100% sure what the problem is... so post some code or an insight to the problem!

Hey guys.. i need ur help again
this is my code:

cout<<"Please insert a new video ID:"<<endl;
    cin>>videoNum;
    cout<<"Please insert a new video Name:"<<endl;
    cin>>videoName;
    cout<<"The new Video ID:"<<videoNum<<endl;
    cout<<"The new Video Name:"<<videoName<<endl;

<< moderator edit: added [code][/code] tags >>

when i input the videoName such as "white chicks"...
the output will be White only.
can somebody tell me why?

the data type for videoName is char videoName[30];

Thanks for ur help guys..
cheers!

cin uses whitespace (a space, tab, etc.) to know when to stop reading. use cin.getline() .

or lok up the modifiers std::skipws and std::noskipws

so,you can use this == >gets();

gets(videoName);

:idea:

The function gets is not safe and should be avoided. As in, NEVER use it.

yeah, this function is not safe.
;) thanks ==> "Dave Sinkula".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.