literals, i dont know what it is?
what is it?
User Profile
Collapse
-
Problem with the suffix of a constant
hello, i've got this problem , as example :
[code=c] long number = 2000000000 [/code]
my manual says that you must place a suffix after 2000000000 :
[code=c] long number = 2000000000L[/code].
suffix L means int must be long.
but why place L , cause 2000000000 isn't integer (not enough capacity), 2000000000 is long!!!!!! why then place L????
im dutch, please explain easy... -
question
hello, constants can't change, i give an example:
int name
int name = name + 1
, we can do this cause variables can change.
but constants cant do this.
is it correct what i am saying? -
hello?
can someone whos very nice answer? -
please answer!
i need to be professional, cause i am , haha
but just please answer.
thanks
kind regards ,
dorkzLeave a comment:
-
i'll give a simple example of variable that can change and a constant that cannot change; ( must be good, if it isn't say it to me)
[code=c]
#include < iostream >
int main()
{
int number = 5 ;
cin.get() ;
number = number + 1 ; // you can do also this number++
cin.get() ;
}
[/code]
that was a variable , it can change!
...Leave a comment:
-
thanks , but to be honest , i do know how templa.te classes works.Leave a comment:
-
oops, i forgotn something to say, you said to me that a variable can change, but a constant not, what do you mean with changing?; please give a program for example that we can change and we cannot change.Leave a comment:
-
can you please give somthing for example; a constant, cause i see that a constant is a number and it beggins with 0X (16 numbers) , 0(8 numbers), and ends with F, L, U.
actually , a constant is very difficul to understand cause of all that ^^^^^^
thanks for answering, i repete again: i've readed the guidl.Leave a comment:
-
difference between variables and constants.
i have readed the guid.l and now i'm ready for some action.
what is a constant? i've readed in a manual what it is but i dont understand.
is that a number or something?
what is the difference between variables and constants?
thank you. -
-
i really dont understand why this program dont work
// er.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
int number1 = '9' , number2 = '1' , answer ;
answer = '9' + '1' ;
cout << answer;
cin.get () ;
...Leave a comment:
-
ok, here is the explaning of char; is a character with two apostrofs like ' ' or 'e' or '4'
integer is not a floating point number its like this 1, 2,3....
unsigned int, long int, unsigned long are too types of int but they have more space for numbers
then we have float , for numbers with . like 4,3854535
a type of float is too a double , its bether, and larger
that was the expalning...Leave a comment:
-
-
-
i've readed everything only what i dont understand : Make use of the available formatting tags in the forum Use CODE tags around your code as appropriate:
Code:..code goes here..
[code=c] ..C like code goes here.. [/code]
[code=html] ..html code goes here.. [/html]
heeyyyy!!! i know everything about these characters and int , but i just dont know why you...Leave a comment:
-
ok, i'm reading your rulez, but PM , theres writed that i dont must pm (or something) experts, do they mean : dont ask question every minute?Leave a comment:
-
characters: only in char, not in int
now, i've waited , now i want to ask a question again,
'6' is a character, 6 is an integer.
integers like 2,4,5,..... ,we putt them in int: integer
characters 'A', '4','d',....... we put them in char : character
that means ; char for characters
int for integers
(if string exist: string for letters)
we cannot put...Leave a comment:
-
man, i'm soo dutch , do you know that? i dont understand code tags and all that other stuff.Leave a comment:
-
dont see anything about tags ; Do NOT PM questions to individual Experts, Moderators or Administrators
Before you post your question
Things that are generally unacceptable
Use a Good Thread Title
How to ask a question
Posting Homework or Coursework Questions and Answers
Do Not Double Post Your Questions
Once Your Question Has Been Answered
While you are in the forum
How to Respond...Leave a comment:
No activity results to display
Show More
Leave a comment: