Results 1 to 2 of 2

Thread: how to save an array inside another array

  1. #1

    Thread Starter
    Addicted Member kikelinus's Avatar
    Join Date
    Nov 2000
    Posts
    219

    how to save an array inside another array

    i want to get an array of characters (string) into another array. using C++. how can i do this?
    here's the code i have.

    Code:
    void newperson ()
    {
    	int count, numppl;
    	cout<<"How many people do you want to introduce?"<<endl;
    	cin>>numppl;
    	for (count=0 ; count <=numppl ; count=count +1)
    	{
    		cin.getline (agendaarray[20], 256);
    	}
    	
    }
    thx

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    You can copy strings using strcpy(), which is basically just a special kind of call to memcpy() I think. I expect they're both in stdlib.h .
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width