Talula
M.Khorram
lets go #ot
Talula
And I've been programming for last 23 years.
Anonymous
If you are posting code here you need help
Anonymous
We are not obligated to help you fix your mess
Anonymous
So do the bare minimum so that people who just see this chat for a few minutes a day can quickly help you
Anonymous
Anonymous
Pasting is the only way you will get help here anyway. Screenshots will be ignored anyway
So by posting a screenshot you are spamming
Anonymous
Anonymous
Screenshot of code and the classic "I am getting an error"
He didn't even describe the error
Talula
What might be simple for me might be very complex for someone who just started programming.
M.Khorram
Dear Rashu Ahmed,
You can ask me your questions from me via direct message
I hope I could help you
Hritik ahalawat
Anonymous
Who can help me configure asterisk server?
Talula
The
Roxifλsz 🇱🇹
Roxifλsz 🇱🇹
Bross
...
klimi
i am interested tho
MᏫᎻᎯᎷᎷᎬᎠ
Quran*
Anonymous
Hii
3zoz
i try all thing but i fill 😥
Talula
Don't post camera shots...
3zoz
sorry i don't know i just want some help
3zoz
sorry 💙
3zoz
r=√(f1)²+(f2)²+2f1×f2×cos
3zoz
3zoz
this mark √ root
Anonymous
/warn screen photo is the error
Alex
you can`t change it
Alex
regarding constant memory its implementation defined I suppose
Harsh
String literals are constant in a way
V01D
Harsh
const int a=5;
This is a constant
5
This is a literal
Alex
can be placed in read only memory, can be not
Harsh
So if u do
char a[]="hello world";
"hello world" is a string literal that can't be changed.
Ofcourse u can change a[], but that doesn't change "hello world"
Harsh
U can't do
"hello world"="hello c++"
Cuz it's string literal
V01D
With const char a[] = "hello world";
you cannot do char[1] = "a";
V01D
const char should be used in pointer strings aka C style strings
Harsh
Better learn about tokens in c++
They'll explain constants and literals
Harsh
Constant is still a variable
Harsh
Literal is not
V01D
You can modify the index of a string literal, but you cannot do that with a const string
V01D
a[1] = 'a';
V01D
You cannot do a = "new string"; though
V01D
You can change a LITERAL at given index.
A constant CANNOT be changed
V01D
//Literal
char a[] = "string1";
a[0] = 'S'; //OK
a = "new string"; //ERROR
//Const
const char a[] = "string2";
a[0] = 'S'; //ERROR.
a = "new string"; //ERROR
V01D
Those are called string literals, not string constants
Harsh
Harsh
5 is literal
Can u change it?
Harsh
Literals are raw values
Harsh
And they are treated as const when passed as function arguments
Harsh
I am talking about strings specifically
Yea u can't change string literals either.
cout << "Hello World";
You can't change the literal hello world
However if u assign a literal to a variable as value
Then u can change the value of variable
Harsh
https://stackoverflow.com/questions/44767354/confusion-between-constants-and-literals#:~:text=A%20literal%20is%20a%20value,various%20times%20during%20the%20program.
V01D
Harsh
U can't
Harsh
Yes
Harsh
Harsh
In other words, hardcoded values are literals
V01D