struct max { int nk; }; void main() { cout<<max; // this gives error. }
cout<<max; //gives error.
Why it is not printing address of nk;
WendellHarper - Dec 06 2020 01:21 PM
WendellHarper - Dec 06 2020 01:14 PM
pindo - Jul 23 2020 01:33 AM
Siten0308 - Jun 20 2019 01:43 PM
johnnylo - Apr 23 2019 07:49 AM
Posted 22 February 2012 - 11:21 AM
struct max { int nk; }; void main() { cout<<max; // this gives error. }
Posted 22 February 2012 - 12:08 PM
Posted 22 February 2012 - 12:10 PM
Posted 22 February 2012 - 12:13 PM
Posted 22 February 2012 - 12:17 PM
Posted 22 February 2012 - 12:46 PM
Posted 22 February 2012 - 01:28 PM
Posted 23 February 2012 - 02:01 AM
It is not.I thought maxil is also a pointer to the memory region nk.
Posted 14 May 2012 - 08:15 PM
typedef struct Max { int nk; }; // Overload << operator for our custom type 'Max' std::basic_ostream<char> & operator << ( std::basic_ostream< char >& out, const Max& m ) { return out<< m.nk; } void main() { Max maxil; maxil.nk = 9; cout << maxil; }
![]() Printing a string after If statementStarted by Bitlynk, 15 Apr 2013 ![]() |
|
![]() |
||
Language Forums →
HTML, CSS and Javascript →
Keeping content together when printingStarted by hinkeltje, 21 Feb 2013 ![]() |
|
![]() |
||
Language Forums →
HTML, CSS and Javascript →
Force printing on A4 landscape formatStarted by hinkeltje, 21 Feb 2013 ![]() |
|
![]() |
||
Language Forums →
PHP →
how to shuffle contents fetched from database before printingStarted by alamin, 13 Feb 2013 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
[C++] Printing a whole text file in separate linesStarted by qyler, 01 Feb 2013 ![]() |
|
![]() |