3 Replies - 585 Views - Last Post: 02 November 2010 - 07:21 AM Rate Topic: -----

#1 Muaado  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 26-October 10

storing a character array inside another character array

Posted 02 November 2010 - 02:13 AM

		if (user_id==1)
			pass1 =stricmp(password,"admin");
		if (user_id==2)
		pass1 =stricmp(password,"user");


The above coding is part of a user authenticating function i did for my assignment. I am restricted to use the old turbo c compiler with which i can't use the namespace .

The above coding needs to be modified so that the user can enter the password as a character array and that inturn will be stored as the password for that particular user id.

To be simple i need to know how i could copy a character array to another character array . I am a beginner and would really be glad if you could help!

thanks

Is This A Good Question/Topic? 0
  • +

Replies To: storing a character array inside another character array

#2 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: storing a character array inside another character array

Posted 02 November 2010 - 02:56 AM

What you want is in this list
http://www.cplusplus...ibrary/cstring/
Was This Post Helpful? 1
  • +
  • -

#3 bedmond  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 86
  • Joined: 09-October 10

Re: storing a character array inside another character array

Posted 02 November 2010 - 03:05 AM

sorry

This post has been edited by bedmond: 02 November 2010 - 03:09 AM

Was This Post Helpful? 0
  • +
  • -

#4 Muaado  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 26-October 10

Re: storing a character array inside another character array

Posted 02 November 2010 - 07:21 AM

View Postjanotte, on 02 November 2010 - 01:56 AM, said:

What you want is in this list
http://www.cplusplus...ibrary/cstring/


thanks man ! that helps !
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1