• Cursos
  • Compilador de Código
  • Discutir
  • Preços
  • Teams
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 Respostas
+ 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

Costuma ter perguntas como essa?

Aprenda de maneira mais eficiente, de graça:

  • Introdução ao Python

    7.1M de alunos

  • Introdução ao Java

    4.7M de alunos

  • Introdução ao C

    1.5M alunos

  • Introdução ao HTML

    7.5M alunos

Ver todos os cursos
Quente hoje
Is it possible to convert .zip file to apk? If yes, how??
1 Votes
Pointers cpp
3 Votes
I think the heart system is ridiculous, 5 hearts that refill after like 5 hours? That is really just crazy to me.
1 Votes
Why can’t I use double “ in python?
0 Votes
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
0 Votes
Is pro worth the money ?
1 Votes
Coding for Cybersecurity
0 Votes
Pointers in c#
0 Votes
2 cases not correct what's the problem
1 Votes
You’re free to give me your advice! 🚨
0 Votes