While I learned C++
I challenged sample problems in which each 1
in stdin will move right in stdout.
In sample answer,T(4,0)
is defined.
As I am beginner, I couldn't understand what is T(4,0)
. is this different from normal arrays? Thanks
sample answer
#include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
string T(4,0);
T[0]='0';
T[1]=S[0];
T[2]=S[1];
T[3]=S[2];
cout << T;
}