This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what does char name[] = new char[ 15 ], temp; do

 
lupercal hill
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
char name[] = new char[ 15 ], temp;

Is temp an array of chars similar to name. I'm not quite sure. I understand the rest of the code. Which please me Thank you for your help.



 
Seb Mathe
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, temp is here just a char...

It's a bad idea to declare more than one variable on one line, especially when some off the varaibles are arrays...

char[] name, temp;

would have defined 2 arrays.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic