First  |  Prev |  Next  |  Last
Pages: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
testing stream "binariness"
Is there a way to test a stream for binariness? Specifically: given an ofstream, is there some method I can call (or some member I can access) that tells me if the ofstream was opened in binary mode? If not, why? -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.mo... 21 Apr 2008 13:19
"expected primary-expression before '>'" error?
The following code gives an "expected primary-expression before '>'" error when compiled with gcc, Dev-C++ version 4.9.9.2. There is no such error with MSVC 2005 or 2008. I would be grateful to know if it a gcc bug, or alternatively what is wrong with the code. template< typename G > struct Test { template... 19 Apr 2008 03:24
assignment operator using a constructor
How does an assignment operator work? Following the code that I give below, I notice it isn't clear how the base operator works. I am not sure. It seems to me that there is a copy constructor formed that is used after the '=' is call. Cout << "assigment operator ", prints first the at the return the copy constuctor... 21 Apr 2008 13:19
const pointer to class problem
I'm trying to slowly convert some C code to C++ and have encounter what's probably a trivial problem. The easiest way to describe the problem is with an example: class FOO { public: int Version(void){return m_ver;}; FOO(){m_ver = 1;}; private: int m_ver; }; void PrintVer(const FOO * f... 21 Apr 2008 11:42
auto_ptr for array of built-ins
Hi, I'm facing a situation where it would seem all possible solutions have some severe inconvenience. I'm creating a C++ wrapper for a C library; in this one function, I need to return a string. The underlying C library expects me to pass it a pointer where to put the result; that pointer needs to be dyn... 22 Apr 2008 12:24
Problems with exception-handling gcc 3.3 Suse 8.2
Hello to all of you, at the moment, I'm despairing! I don't know why my code doesn't work. Have a look: void CMyClass::DoSomething() { try { DoItNow(); } catch(...) { std::cout << "Exception caught!\n"; } } void CMyClass::DoItNow() { throw 5; } I compiled this code... 18 Apr 2008 07:36
generation of called member functions
If a member function is not called it is not generated. If a member function is called by another member function (ad infinitum) ..... ....(Question:) Is it generated or does the compiler trace through all of the calling member functions and finding NO external call, not generate any of the functions in the callin... 17 Apr 2008 20:31
communication between classes
hi there, i'll try to keep this as short as possible to avoid a wall of text. for my CG class in college i have to build an asteroids clone using an opengl c++ wrapper provided. the way this wrapper works is fairly simple, it provides a serie of interfaces that we have to inherit from (and we inherit the ones ne... 18 Apr 2008 18:14
same name for types and variables
Hi all, Working with g++ 3.* I have to include 3rd party C-headers which tend to use the same name for typedefs and variables e.g: <snip> /* test.h */ typedef int bar; struct foo { bar bar; }; </snip> ....which seems to be valid C-code. When I include these with: <snip> extern "C" ... 18 Apr 2008 18:14
-1%N = -1
Does anyone know why the remainder and the division operations are incorrect with negative numbers in C++? Is it about assembly? OuFeRRaT -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] ... 20 Apr 2008 17:11
First  |  Prev |  Next  |  Last
Pages: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30