Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nice Book to Learn + Need Help ;P
#8
(01-28-2012, 02:49 PM)Pacman-Nemtap Wrote: That's it, what is the char exactly used for in a program, to understand what someone puts in???

Like I mentioned, it depends. Perhaps you have a program where you need to iterate through a selection of letters from the alphabet to make a check as to whether a sentence contains certain values. For example, checking for vowels?

Otherwise if you have something like this, you can make it a char string:

Code:
int main()
{
    char * str = "string value";
}

You're using a pointer here as type char, but this enables you to use a string value.

Otherwise you can use string:
Code:
int main()
{
    string str = "my string";
}
Reply


Messages In This Thread
Nice Book to Learn + Need Help ;P - by ///ViNcE - 01-27-2012, 06:03 AM
RE: Nice Book to Learn + Need Help ;P - by AceInfinity - 01-28-2012, 02:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  C# book? Miku 7 1,378 12-29-2011, 11:17 PM
Last Post: Miku
  At What Age Did You Learn C++ Win 66 20,740 12-11-2011, 02:52 PM
Last Post: Neel

Forum Jump:


Users browsing this thread: 2 Guest(s)