Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #3K
~21.9K People Reached
Favorite Tags
Member Avatar for Elixir42

Hi Answerers, **Background:** I just figured out how to solve my unresolved external symbols by just dragging the project files from explorer (contained in exe's directory) and plonking them in the dll project, under thier own filter! **Original Situation:** I was getting 'unresolved external symbols' errors because I was #include-ing …

Member Avatar for Elixir42
0
247
Member Avatar for Elixir42

Hi 'Wise & Wonderful Daniwebbers', Why do I keep loosing my project settings when I add a new project to an existing solution? I have to go to every project, in the solution and re-configure each project's: * Include Directories; * Library Directories; * Linker Settings; etc., Which of the …

0
144
Member Avatar for Elixir42

Hi, The problem I am having is that the returned object, from a dll factory, is not lasting for more than the function scope that recieves it. Despite reading [How to prevent the static initialisation order fiasco](http://www.parashift.com/c++-faq/static-init-order-on-first-use.html) I fail to see how it even applies to my code. `g_spEngineLog` is …

Member Avatar for Banfa
0
279
Member Avatar for Elixir42

Hi, When I initialise then access the `g_spMyLog` shared pointer, from within the `CSingleton::CreateLog` member function, it works ok. Accessing the SP from the static member function of `CSingleton::Create()` causes an `access violation` in the original project and an abort in this sample project displayed below. In the original project …

Member Avatar for Elixir42
0
526
Member Avatar for Mohamed_31

A space shuttle measured the distance between earth and Mars as a very large integer number of centimeters. Write a C++ program that reads such distance as centimeters and displays the kilometers, meters and centimeters equivalent.

Member Avatar for Elixir42
0
146
Member Avatar for tharindu123
Member Avatar for Elixir42

Hi Kind-DaniWebbers, How do you initialise a boost::archive:binary_oarchive in a different place to where you declare it? So: class CBase { std::ofstream m_ofs; boost::archive:binary_oarchive m_binOA(); // <== default constructor virtual void Open(std::string& s) = delete; }; class CDerived : CBase { void Open(std::string& s) override { CBase::m_ofs("filename.bin", std::ios::binary); CBase::m_binOA(CBase::m_ofs, /*flags*/); …

Member Avatar for Elixir42
0
414
Member Avatar for Elixir42

Dear Kind DaniWebbers, I am trying to overload the fstream operators (ofstream/ifstream), so that I can save a class to a 'Binary' file and also display it with cout. But the ways in which each need to be implemented is different. Please can you show me how to define different …

Member Avatar for vijayan121
0
4K
Member Avatar for Elixir42

I have read tutorials using my google-fu on how to set up Pre-Compiled Headers, and now I wanted to clear up a few questions: If all the 'to be pre-compiled' headers go in one file - "stdafx.h" then how do you say you only want 1 of those files in …

Member Avatar for Ancient Dragon
0
203
Member Avatar for Elixir42

Dear Kind-Coders, I am trying to learn to use boost::shared_ptr to manage the lifetime of a DLL, but I am having a type conversion problem whilst setting it up. Please see the following code: #include <boost/make_shared.hpp> int main() { { class CMyClass { public: CMyClass() {} ~CMyClass() {} int MyInt; …

Member Avatar for Elixir42
0
2K
Member Avatar for Elixir42

Hi I'm trying to create an array of function pointers contained within a class, the C++11 way. Can I have some help with this as I'm getting a bit mixed up. Here's what I have done so far. They are made up classes to define the problem. #include <iostream> #include …

Member Avatar for Elixir42
0
260
Member Avatar for Elixir42

Hi, Please may I have your help on this one. The error is: 1>------ Build started: Project: DXTB 17, Configuration: Debug Win32 ------ 1> Main.cpp 1> _MyDebug Defined... 1> _Main Defined... 1> _CApplication Defined... 1> _CSpriteManager Defined... 1> _CSprite Defined... 1> __CStats Called... 1> _CStats Defined... 1> _CVector3F Defined... 1> …

Member Avatar for Elixir42
0
244
Member Avatar for Elixir42

Hi , Please can anyone help. I have a window(1280x768) that contains a resolution(1920x1080). I am trying to use ScreenToClient to obtain the mouse coordinates while in windowed format. I am drawing a line from a subject to the mouse cursor which works fine in fullscreen but not in windowed. …

Member Avatar for Elixir42
0
500
Member Avatar for Elixir42

Hi, Im using DX9c and learning from Frank Luna's book to try and handle OnLostDevice and OnResetDevice, when switching to fullscreen and back (and alt+tabbing). If I dont draw anything I am able to go from windowed to fullscreen, and back, with no trouble. But adding a draw and flush …

Member Avatar for Elixir42
0
203
Member Avatar for Elixir42

Everything was running fine, then I made a simple change. Like adding a class or two and bang!!! C2995. Can you spot where I have obviously gone blind and cannot see the error. I have header gaurds throughout the solution, so I dont understand why this is happening. Here are …

Member Avatar for Elixir42
0
433
Member Avatar for can-mohan

Hi, I do have doubt regading use of delete p . In most of the scenarios we call delete inside the destructor if we would have called something int *p = new int (10); but as per below code snippet (original code of delete p) it already invoke the destructor …

Member Avatar for Elixir42
0
136
Member Avatar for Elixir42

I have written a working templated linked list that can hold a number of Types. Each of which are created with new before sending them to the InsertNode function. in Main: CMyType* pMyType1 = new CMyType; // Create a new MyType* pMyType1->m_iData = 5; // Hold a value LLMyTypes.InsertAtEnd(pMyType1); in …

Member Avatar for Elixir42
0
254
Member Avatar for Elixir42

Hi I am allocating memory space and adding nodes like this: CSprite* pNewSprite = new CSprite; // Create new sprite pNewSprite->iData = iChoice; // Attach data EnemyList->AddNode(pNewSprite); // Send to AddNode and also in the ::AddNode: void CLinkedList::AddNode(VOID* pData) { CNode* pNewNode = new CNode; // Create the Node pNewNode->pData …

Member Avatar for Elixir42
0
230
Member Avatar for dokukani

Is my functions correct? If I type in the highest temp at the bottom row, my program wouldn't take it. Same goes for lowest temp. Can anyone provide some in sight? #include <iostream> using namespace std; //declare constant for array temperature int const row = 3; int const col = …

Member Avatar for remunance
0
354
Member Avatar for Elixir42

Hi, Using Visual Studio 2012. Why does the syntax highlighting turn off periodically. Then unexpectedly it turns back on again, unreproducably, and rather annoyingly. A chocolate eclair for anyone who knows...?

Member Avatar for Ketsuekiame
0
200
Member Avatar for Doogledude123

void drawMap(std::string MapLoc) { char* gridMap[95] [55]; ifstream Map(MapLoc, ifstream::in, ifstream::binary); while (Map.good()) { for(int i = 0; i < 95; i++) { for(int j = 0; j < 55; j++) { if (gridMap[i] [j] == "X") { //Draw Wall glColor4ub(255,255,255,255); glBegin(GL_QUADS); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glEnd(); } else if …

Member Avatar for Doogledude123
0
694
Member Avatar for Feal456

So I am writing a cash register program, person buys items and the number calculates. But I am stuck at looping, I want the user to pick to pick all his/her items first then after all the program is done I want the program to ask if the user wants …

Member Avatar for CGSMCMLXXV
0
3K
Member Avatar for Doogledude123

Im incrementing a value in a while loop, but its only incrementing when my mouse is moving. Any ideas? while (isAlwaysTrue) { value += 1; } Thats basically what Im doing.

Member Avatar for Doogledude123
0
1K
Member Avatar for Ritesh_4

Hi, first apologies if I've posted in the wrong forum. I would like to know what are the steps if I want for example to compress a pc game which is originally 13GB to fit in a single 4GB dvd. I've seen many games which are 4GB as compressed files …

Member Avatar for Ritesh_4
0
140
Member Avatar for Carc369

How do you do that? This code reads in the book. It reads in fine. Now I just have to alter it so it doesn't read in repeat words in the book. How would I do that? void readInStory(){ ifstream inStream; // declare an input stream for my use int …

Member Avatar for vijayan121
0
686
Member Avatar for Elixir42

Hi I am getting some strange results from my framerate calculation. It seems to have a mind of its own. It wants to stay at about 60 fps even if I set it to 80fps. It does run though if I set it to 50fps. I am getting smooth movement …

0
78
Member Avatar for Elixir42

**Simple Question:** What is the best way to set the framerate. Is it with GetTickCount() or QueryPerformanceCounter()...? Please can you give me a coded example of how to use whichever one within the 'Game Loop' ? **Advanced Question:** Is it possible to do something in the 'Waiting' part of the …

Member Avatar for Elixir42
0
87
Member Avatar for Elixir42

I have a function to detect if the mouse is over a mesh but what if I had a hard coded square. I am using D3DXIntersectTri() and pluggin my vertices into it. but they (obviously) dont update when I move the square. My question is how do you get the …

0
63
Member Avatar for Elixir42

I have searched on the internet for a 'working' double to char* does anyone have any idea? I need to pass the string to a function that takes a char* as an argument.

Member Avatar for Elixir42
0
3K
Member Avatar for Carpetfizz

Hello, My friend and I were done with our work in math class, and threw together this little text-based rpg in like ten minutes. Anyway, we're having a small issue, everytime I press the "2" for "Fight!" the loop regenerates the random values and we mysteriously gain health that was …

Member Avatar for Carpetfizz
0
210