• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu
+ 2

int a(2)

What does it mean? What is the difference between it and int a=2

c++
24th Jan 2017, 8:16 AM
Amr Gamal
Amr Gamal - avatar
2 odpowiedzi
+ 6
This is a very good question! http://stackoverflow.com/questions/4470553/initialization-parenthesis-vs-equals-sign
24th Jan 2017, 11:11 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
int a(2); cout << a; this still outputs 2, so there may not be a difference
24th Jan 2017, 10:06 AM
Aaron
Aaron - avatar

Często masz takie pytania?

Ucz się bardziej efektywnie, za darmo:

  • Wprowadzenie do Pythona

    7.1M uczących się

  • Wprowadzenie do Java

    4.7M uczących się

  • Wprowadzenie do C

    1.5M uczących się

  • Wprowadzenie do HTML

    7.5M uczących się

Zobacz wszystkie kursy
Popularne dzisiaj
Is this realistic enough?
1 Votes
"Which is harder to master — Machine Learning or Cybersecurity? And why?"
1 Votes
"What’s the best way to combine creativity and coding? Can storytelling improve web apps?"
1 Votes
Need friends
0 Votes
MASS N NUMBER OF OBJECT DELETION FROM A CLASS
0 Votes
I am a beginner, please teach me how to use Python
0 Votes
Python
1 Votes
Can u learn multiple language at the same time, without misplacing the formats of each with the other
0 Votes
How do you print inputs
0 Votes
Can someone please explain python for me
0 Votes