I have a simple program I am using to explore typedef and structs more:
Code:
// /usr/include/c++/3.3/backward/iostream.h
#include <iostream.h>
typedef struct test_struct{
int a;
long b;
char *c;
} *p_test;
int main(void){
test_struct t;
p_test p;
p = &t;
cout << "Size Of Struct: " << sizeof(test_struct) << " bytes" << std::endl;
cout << "Address Of Struct: " << &t << std::endl;
cout << "Size Of a: " << sizeof(t.a) << " bytes" << std::endl;
cout << "Address Of a: " << &t.a << std::endl;
cout << "Size Of p: " << sizeof(p) << " bytes" << std::endl;
cout << "Address Of p: " << &p << std::endl;
cout << "Contents Of p: " << p << std::endl;
}
I compile with
Then I get this warning:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
I did a
Code:
find / -name iostream.h
and the only path that came up was /usr/include/c++/3.3/backward/iostream.h which is the very iostream that I linked to. Where is the "correct" iostream? Is it in some package? How does this work? Thanks.