Main Menu


Sponsored Links

  


  
  
Web Cartoon Maker: a Fun Way to Learn C++ Contents Previous Next

Values

A value is one of the fundamental things – like a string, a letter or a number – that a program manipulates. The only values we have manipulated so far are the string and the floating-point numbers. We used strings as parameters of our text objects and compiler identified them because they are enclosed in quotation marks. We used floating point values as parameters to SetTime function and compiler identified them because they only contain digits and a floating point sign (dot).

There are other kinds of values, including integers and characters (in general, we are not talking about cartoon characters yet! We are talking about letters or symbols which make up strings). An integer is a whole number like 1 or 17 . A character value is a letter or digit or punctuation mark enclosed in single quotes, like ’a’ or ’5’ .

Fun Note: A character is actually stored in memory as an integer value. For output, the compiled program uses the character’s value plus the defined font, color, size and other information (italic, case, etc.) to display the character on the screen. There are fonts available that can display a normally alphanumeric character as a cartoon character. A quick Google search (try “free dingbat fonts”) will yield dozens of them.

It is easy to confuse different types of values, like "5" , ’5’ , 5.0 and 5 , but if you pay attention to the punctuation, it should be clear that the first is a string, the second is a character, the third is a floating-point and the forth is an integer. The reason this distinction is important should become clear soon.


Contents Previous Next
  
News

New Tales Animator Video by Alan Sturgess

Alan Sturgess shared an excellent video he made using Tales Animator! You can still download Tales Animator here. Unfortunately it is only available for Wi

...

Simple Online Character Designer

There is a prototype of simple online character designer available HERE. It is only a prototype, it does not contain many pieces yet but it can already generat

...

Book is updated

Now our book "Web Cartoon Maker: A Fun Way to Learn C++" is fully in synch with WCM 1.5! It is available for download and online reading HERE.

...

Web Cartoon Maker 1.5 is here!

Web Cartoon Maker 1.5 is finally here! You can download it HERE! Here is what was updated in version 1.5: Web Cartoon Maker Desktop Edition is now fully standal

...

read more news...


Poll