python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
List initialization (aka uniform initialization) and initializer_list?
Why does the following code give different output?
std::vector<int> v{12};
std::cout << v.size() << std::endl;
std::vector<int> v(12);
std::cout << v.size() << std...
aleck099
Votes: 0
Answers: 1
How to solve "error C2078: too many initializers" when moving the same members from the parent class to its child?
I am facing a relatively tricky situation here that seemed quite easy at first sight. After moving those three members from the parent class Parent to its child class Child it seems that I'm no longer...
tbop
Votes: 0
Answers: 1
Difference between int x = 5; and int x = {5}
Both of these statements work the same:
int x = 5;
int x = {5};
That's also true when I try:
char str[] = "hello";
char str[] = {"hello"};
How does the language define initiali...
user3787309
Votes: 0
Answers: 2
objects as class data members using default constructor with and without initializer list
for the following program
#include <iostream>
using namespace std;
class university{
private:
string uni;
public:
university(){
cout<<"default constructor of universi...
Youssef Ahmed
Votes: 0
Answers: 3