Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
~7K People Reached
Favorite Tags
c++ x 24
Member Avatar for mikeandike22
Member Avatar for ganbree

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 …

0
83
Member Avatar for csayantan

how to compile c++ program when we r using two different functions which are defined in different file(s) under same directory in linux gcc???

Member Avatar for Tom Gunn
0
185
Member Avatar for astropirate

Greetings all How can i create an executable in run-time? (win32). i need a simple wrapper for different console commands. this is because i must have executable there is no way around it. so what i have come up with is passing the command that i want executed as a …

Member Avatar for ganbree
0
129
Member Avatar for JohanG

Hi! I am trying to design and build a plugin-system to a project of mine. The basic design is to use DLL's for each plugin. Each plugin have a special function that loads all of its functions as macros to the main engine, which has been passed as a pointer …

Member Avatar for ganbree
0
116
Member Avatar for rmlopes

Hi everybody, I am having some problems with a multi-threaded application I am developing. I get segmentation faults in different places, always related to std::string, using g++4.3.2 on Ubuntu 8.10 server. Here is an example: [icode] #0 0xb7e18bb6 in memcpy () from /lib/tls/i686/cmov/libc.so.6 (gdb) up #1 0xa8eb1014 in ?? () …

Member Avatar for ganbree
0
158
Member Avatar for ganbree

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: …

Member Avatar for ArkM
0
92
Member Avatar for ganbree

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. …

Member Avatar for Narue
0
137
Member Avatar for ganbree

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] …

Member Avatar for seanhunt
0
578
Member Avatar for drichird

Well I made it through my first semester of an MSCS. Almost. This summer I want to build a game. I am trying to understand a little bit of the history of Windows graphics and am a bit confused. There's WinAPI. There's OpenGL. There's DirectX. As I understand it, OpenGL …

Member Avatar for Grigor
0
160
Member Avatar for monstro

Given all that I hear about the problems with global variables, is it possible to declare a windows CRITICAL_SECTION object as a member of a base class that will not be created for each derived class? I want to implement an instance counter that is threadsafe, so I thought about …

Member Avatar for monstro
0
192
Member Avatar for shadowfire36

well my struct is fix but i have new errors i hve never seen before : here are the errors [code=cpp] football.cpp(194) : error C2664: 'void Football::SearchMatches(Match *,int,std::string)' : cannot convert parameter 1 from 'Match *[2000]' to 'Match *' football.cpp(205) : error C2664: 'void Football::SearchMatches(Match *,int,std::string,int)' : cannot convert parameter …

Member Avatar for shadowfire36
0
134
Member Avatar for iepley

I have noticed that my email account has sent out messages that are bounced from other firewalls. The messages are sent from a ficticious account with my domain name and the emails are the general spam variety. When I do a virus search, nothing comes up. How do I find …

Member Avatar for ganbree
0
146
Member Avatar for bhuwanrc

[code=cplusplus] void fishing(vector<Fish*> &basket); int printBasket(vector<Fish*> &basket); int main() { vector<Fish*> FishVec; Fish* aFish; int totalweight=0; int i=0; while (totalweight<15000) { fishing(FishVec); aFish=FishVec.at(i); aFish->printMe(); if (aFish->acceptable()) { totalweight+=aFish->getWeight(); cout<<"total weight:"<<totalweight<<endl; cout<<" Has been put in the basket"<<endl; } else { cout<<" Was released"<<endl; } i++; cout<<endl; } } void fishing(vector<Fish*> …

Member Avatar for Salem
0
77
Member Avatar for carnage

i would like to create a program that converts a number system to another i found few ideas on how to do this but lacks explanation so i can't figure out 'how it worked'. found that 'for loop' over the net,did some editing then applied it in a program. here's …

Member Avatar for Narue
-1
2K
Member Avatar for ganbree

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; …

Member Avatar for zhelih
0
94
Member Avatar for boyz

How many arguments can a return statement have Is this possible return(n-1,m+1) in this case what will it return and why

Member Avatar for vmanes
0
86
Member Avatar for ganbree

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 …

Member Avatar for vijayan121
0
1K
Member Avatar for ganbree

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 …

Member Avatar for ganbree
0
206