tm *ltm = localtime(&now);
cout << "Year: "<< 1900 + ltm->tm_year << endl;
in ctime lib
why we must use ltm->tm_year but can't use *1tm.tm_year
tm_year << endl; in ctime lib why we must use ltm->tm_year but can't use *1tm.tm_year" /> tm_year << endl; in ctime lib why we must use ltm->tm_year but can't use *1tm.tm_year" /> tm_year << endl; in ctime lib why we must use ltm->tm_year but can't use *1tm.tm_year"/>
tm *ltm = localtime(&now);
cout << "Year: "<< 1900 + ltm->tm_year << endl;
in ctime lib
why we must use ltm->tm_year but can't use *1tm.tm_year
Copyright © 2021 Jogjafile Inc.
Because of the precedence of operators in c++
means
you can do
but thats a bit ugly, hence this: