Forum: Computer Science 19 Days Ago |
| Replies: 0 Views: 398 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... |
Forum: C++ Jul 9th, 2009 |
| Replies: 10 Views: 431 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... |
Forum: C++ Jul 9th, 2009 |
| Replies: 5 Views: 335 int main()
{
system("dummy text afgfdhhgfhjjg");
}
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... |
Forum: C++ Jul 9th, 2009 |
| Replies: 1 Views: 189 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... |
Forum: C++ Jul 9th, 2009 |
| Replies: 1 Views: 181 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,... |
Forum: Computer Science Jun 20th, 2009 |
| Replies: 13 Views: 21,475 so... what's so cool about ressurecting dead threads? |
Forum: C++ May 25th, 2009 |
| Replies: 3 Views: 213 So they're being invalidated.
My first thought was to create a 'smart' iterator that wouldnt be invalidated. But to do this it'd need to traverse the structure back from the stack allocated point;... |
Forum: C++ May 25th, 2009 |
| Replies: 3 Views: 213 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... |
Forum: C++ May 25th, 2009 |
| Replies: 10 Views: 525 |
Forum: C++ May 22nd, 2009 |
| Replies: 10 Views: 525 No its definitely in the same directory as the executable, I said I've been using XCode twice now.
Which is why I said that it's not a problem with the code.
Anyway, I think I've found the... |
Forum: C++ May 21st, 2009 |
| Replies: 10 Views: 525 OK....
1. The file definitely exists and is not empty.
2. It works when running with Xcode but not when executed through Finder. I don't think this is a problem with the code, but something else.... |
Forum: C++ May 21st, 2009 |
| Replies: 10 Views: 525 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... |
Forum: C++ Feb 16th, 2009 |
| Replies: 2 Views: 798 I'm trying to read a Unicode file using std::wifstream. On wintel.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() |
Forum: C++ May 16th, 2008 |
| Replies: 3 Views: 407 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... |
Forum: C++ May 16th, 2008 |
| Replies: 3 Views: 1,427 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. |
Forum: OS X May 16th, 2008 |
| Replies: 5 Views: 5,112 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... |
Forum: Game Development May 14th, 2008 |
| Replies: 4 Views: 1,471 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... |
Forum: C++ May 14th, 2008 |
| Replies: 2 Views: 406 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.
... |
Forum: C++ Jan 27th, 2008 |
| Replies: 14 Views: 4,002 cout << "Line1 in source"
<< "Line2 in source"
<< endl; // new line in output |
Forum: C++ Jan 27th, 2008 |
| Replies: 2 Views: 564 I'm trying to devise some base classes for a large system
So why doesn't this work?
#include <iostream>
using std::cout;
using std::endl;
#undef GetObject |
Forum: C++ Nov 18th, 2007 |
| Replies: 8 Views: 1,998 is CreateWindowEx() MFC? I always thought so; I might be wrong :$ |
Forum: C++ Nov 18th, 2007 |
| Replies: 8 Views: 1,998 I think I've almost solved this one:-
I've added the /ENTRY switch as /ENTRY:WinMainCRTStartup.
Problem is that I don't want any CRT in my application, do you know if that value with add any?... |
Forum: C++ Nov 18th, 2007 |
| Replies: 8 Views: 1,998 Sorry but it doesn't seem it be working that way, as that is what I have in effect done.
LINK : fatal error LNK1561: entry point must be defined
I need to define the entry point as inside the... |
Forum: C++ Nov 18th, 2007 |
| Replies: 4 Views: 1,651 But in case you don't have a book...
return can only be passed one value. However it could be an array if they are of the same type. |
Forum: C++ Nov 18th, 2007 |
| Replies: 8 Views: 1,998 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... |
Forum: C++ Apr 2nd, 2007 |
| Replies: 2 Views: 3,513 All, i can say is that this is shamefull, it takes me 3 hours to find out that the device is lost in DX9 when windows are switched, I had searched everywhere! I found it on a Managed C# Forum and im... |
Forum: C++ Apr 2nd, 2007 |
| Replies: 2 Views: 3,513 :sad: it seems i'm being ignored, I wonder what I'm doing wrong??
do you believe I am not doing any work myself?
do you not beleive that this is now homework of any sort!?
am I being... |
Forum: C++ Apr 2nd, 2007 |
| Replies: 2 Views: 3,513 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)... |