Really, wow then that's great I won't be asking myself tons of questions!
Thanks a lot!
Type: Posts; User: mikahell
Really, wow then that's great I won't be asking myself tons of questions!
Thanks a lot!
Hi, I started coding some asm through C++ so I can optimize my own graphics engine drawing functions. I managed to learn asm and get a nested loop of pixel access and drawing working fully and I can...
Okay, so I see it has to do with standards... I didn't know about the PIMPL though, maybe I can get something out of this! Thanks!
Hi! I started learning to build DLLs, and I discovered something that I find weird. Probably other people have realised this already, or maybe my compiler is just doing funny things... Well, here's...
Well, I guess that with the little example I have shown, templates would have been a better solution, but in my real application, I can't use a templated function there, unless I would use template...
Thanks alot it works just fine! I thought that not writting a "##" before the FUNC_NAME would have caused a compilation error, since the macro params should always be surrounded with "##".
Hi, I was trying to use #define to build several functions that all contains similar code but with different variables types and return types, etc. The following example will look useless, but I...
Ok, I get it. Then I will just leave them in header files with the code. Thanks for your help!
Hi, I was trying to store a templated function in a DLL to use it in some other app, but after
getting linker errors, I figured out that we can't put templates in DLL because the function
doesn't...
Ok so I should stick on with project settings....
Well thanks, I will do it that way and try not to forget!
Sorry for not being enough clear, why I need to do this, is because in some header file I need to import a .lib file, but I figured out that MS-VS 2003 (maybe 2005 handle it differently!) can't just...
Hello, I would like to know if there is a pragma that can tell the working directory for the current file. I know that there is a defined macro called "__FILE__", which returns the source's filename...
Defining both classes methods afterwards.... Oops, forgot to try this solution :P Logically this should solve my problem, thanks to you both!
Well... It doesn't work for me... Maybe I wasn't clear enough... Let's say in "class2", I want to use my "undefined class1 pointer" to call a method from the "base" class. If I only define class1 as...
I try to define a derived class that I would like to use in another derived class, but defining the first one after the second... It works when not bothering with inheritence:
class class1; ...
Thanks! it was just because of "/GR". Now it works just fine!
Don't know if it helps, but here is the error:
"Microsoft C++ exception: __non_rtti_object @ 0x0012fda4."
As I said, I just copied-pasted CornedBee's code directly in a new app,
and so I...
Well ok, but now that's even stranger than before, CornedBee, youre code
don't work properly for me... I use MSVC++ and then I get an error in file
"dbgheap.h" because of the "typeid(*ptr)" 's...
I still face a problem as with dynamic cast I have to write the derive type
directly between the <>'s, and I don't want to write the name of the derive
here, because it will seem illogical to ask...
Well, that's funny because I tried this too, and it still didn't worked...
Can you show me something that actually works?
Is there any way to print the name of a derive class with a typeid trick,
because I can only manage to write the root class of a root class pointer?
So it will output "class Base", but I would...
I don't understand why, but today I tried again to compile without
writing static, and then it worked... I don't see why yesterday it wouldn.t
work, because I made no modifications to my code...
Well it's not that I need it to be static, but I get
errors if I don't write "static" in front of my method
as soon as I use a template for a method...
Well if my class's var get static, I won't be able to use NEW.
I can't give an instance of what I'm working with as I will always be passing
different kind of derivate classes...
Is there really...
Hi, I'm trying to do a class that will be able to allocate an array of derives class
by having an array of pointer of a root class. Then I'd call a method that receives
a template representing the...