- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
19 Posted Topics
Re: so... what's so cool about ressurecting dead threads? | |
I'm trying to advance my understanding of how computers and compilers work. Given the C++ program bellow with exceptions and runtime typing turned off and no optimizing that removes main or makes it into a non-standard function. [code=c]int main() {return0;}[/code] Produced an disassembly with the following code for main: [code=asm]pushl … | |
Re: Okay, using #include "anotherfile.cpp" does cause naming conflicts, because it will cause multiple files to contain copies of definitions for the same function, use header files to declare functions. Also build with separate compilation and linking stages. If you want to compile from the command line look into makefiles or … | |
Re: [CODE]int main() { system("dummy text afgfdhhgfhjjg"); }[/CODE] 1. Compile this 2. Searching the executable for the string literal and note the offset 3. Use a binary fstream to overwrite that section in the executable producing executable. 4. Hope that overwriting with a larger string won't go over anything important. 5. … | |
Re: First, that is a scary amount of source to post as an example. I wouldn't use DLL for this, I would use a scripting language such as Lua or Python (actually I wouldn't because I hate these languages with a vengeance). There should be one appropriate for the task to … | |
Re: Try the compiler flag. --enable-threads I don't use gcc regularly so I have no idea what -D_GLIBXX_DEBUG does, this might or might not solve the problem. Thanks in advance; in advance, taken. ;) | |
Okay, I've got a serious problem with std::vector, the code I'm working with is huge and it's got vectors left, right and center. The problem is that one of the vectors is having to reallocate itself elsewhere. This is causing the references to point to random things. For illustrative purposes: … | |
I'm trying to port some existing C++ code to OS X. The problem is that it doesn't want to load files to read from them. The code bellow illustrates this problem; when run from Finder it outputs "Failed to open input file.", however when run from Xcode it runs correctly. … | |
I'm trying to read a Unicode file using std::wifstream. On wintel. [code=c++] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { wifstream File("input.txt"); wstring Line; while(!File.eof() ) { getline(File, Line); wcout << Line << endl; } system("pause"); return 0; } [/code] And this is my output [code] … | |
Re: Ok, on windows you can use GDI, DirectX and OpenGL to create games. GDI should not be used for any games in my opinion, it is not hardware accelerated and on vista due to the software / hardware bliting it has become even slower! If you try to make a … | |
Re: Please note that you must create a copy constructor! Because else if you do Object = Object2 then they will share a critical section and will both try to dealocate it. | |
Re: At those points in the code you are sending a pointer to a pointer to an object when the function/method wants a pointer to an object. This looks like you want to send a particular element of the array but you are passing a pointer to the entire thing. (Arrays … | |
Re: It is almost guarantee that you do not have a virus. The fact is that you can send emails that look like they come from anyone you want, it's great fun. SMTP and POP have no authentication of senders, there are protocols that do but their use is not widespread. … | |
Re: Your printbasket function seems to be fine. This is not a solution but it would make it easier to read if you used indention to show scope. The problem does not appear to be in printbasket. Look at fish::printme. Are the different fish classes derived from the fish class? Calling … | |
Re: [CODE=cpp] cout << "Line1 in source" << "Line2 in source" << endl; // new line in output [/CODE] | |
I'm trying to devise some base classes for a large system So why doesn't this work? [CODE=cpp] #include <iostream> using std::cout; using std::endl; #undef GetObject class IObject { public: IObject() { References = 0; } unsigned int GetRefCount() { return References; } private: protected: unsigned int References; friend class CHandle; … | |
Re: But in case you don't have a book... [B]return[/B] can only be passed one value. However it could be an array if they are of the same type. | |
I'm using Visual C++ 2005 Express. In my solution I have 2 projects, a static library project and a executable project. The problem starts because I need WinMain() inside the static library to remove almost all the platform specific code from the executable project. How you set the entry point … | |
Ive been writing a DirectX application for some time and there has been a bug that I have been unable to fix, but this is to do wth the Windowsx API. I can run my DirectX application (Fullscreen) fine, but when I Minimise it then restore, fullscreen mode does not … |
The End.