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
~22.3K People Reached
Favorite Tags

36 Posted Topics

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
257
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
147
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
284
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
530
Member Avatar for Mohamed_31

you could have googled and produced... `1km = 1000m, 1m = 100cm, 1km = 100,000cm`. So then... int iCentimeters = /*Whatever space shuttle records in cm*/; int iMeters = int(iCentimeters / 100); int iKilometers = int(iMeters / 1000); The int() will cast away the floating point result. Now just output …

Member Avatar for Elixir42
0
147
Member Avatar for tharindu123

Its true you have to make an effort on your own behalf. But here is the sugar you are after. Read http://www.boost.org/doc/libs/1_55_0/libs/serialization/doc/index.html (All of it!) and here is how to write and read - you can choose whether you want binary or text. Let me know if you need more …

Member Avatar for Elixir42
0
522
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
425
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
205
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
279
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
247
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
516
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
451
Member Avatar for can-mohan

Sorry if I might be wrong but what I have done is to create a ::destroy() function then I can choose to destroy and handle the deallocation of variables when I choose to do so. Preventing double deletion when the program exits and calls the destructor.

Member Avatar for Elixir42
0
137
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
258
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
236
Member Avatar for dokukani

You are checking the lowesttemp and highesttemp as zero to begin with you need to initialise them as the first element of your chosen array col. So add lowesttemp = temp[LOW][0]; before the for loop and the same with the highesttemp = temp[HIGH][0]; before the for loop again see here: …

Member Avatar for remunance
0
361
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
203
Member Avatar for Doogledude123
Member Avatar for Doogledude123
0
702
Member Avatar for Feal456

Add a choice "6. To exit" then add a while loop encompassing all the code: While (choice != 6) { // Code here } This gets checked at the begining and end of every loop checking the variable choice is not equal to 6 otherwise it will keep going. Also …

Member Avatar for CGSMCMLXXV
0
3K
Member Avatar for Doogledude123

Its not very accomadating you not sharing code back to us, but here's some help anyways... Your value is being increased every frame as it is in the the same code block as your mouse detection code (guessing). Without you taking a risk and showing the code we cant help …

Member Avatar for Doogledude123
0
1K
Member Avatar for Ritesh_4

If you coded the game yourself I suggest looking at ways to streamline your data by using bitvalues instead of whole data primitives (as an example). Also reducing the resolution of your graphics files. Otherwise If you bught the game just use Winrar or 7Zip or something to compress the …

Member Avatar for Ritesh_4
0
141
Member Avatar for Carc369
Member Avatar for vijayan121
0
699
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
88
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
64
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

oh no way you beat me!!! ok heres the code anyway for you tidied up and corrected #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int wepchoice; int questchoice; float charhealth=100; float enemyhealth=100; float enemyattack; float remhealth; float charattack; //float remhealthenemy; not needed int main() { cout << "You …

Member Avatar for Carpetfizz
0
229
Member Avatar for Elixir42

Hi I am setting the sampler states initially then setting them on the fly with keypresses that I know runs but I dont see anything changing. Am I missing something. Can I just call SetSamplerState(...) anytime or do I need to call something after? static bool bToggleH = false; static …

Member Avatar for Elixir42
0
229
Member Avatar for poloblue

I think you are supposed to use your constructor to initialise your stuff.

Member Avatar for Stagnant
0
139
Member Avatar for FreddyGIraheta
Member Avatar for MandrewP
0
110
Member Avatar for Elixir42

Hi I can't seem to adjust the D3DXFONT_DESC properties. Sometimes it breaks at getDesc(...). I want to be able to have **each text row have their own font description and be able to change it**. Why is it not working??? Maybe I setting it in the wrong place or maybe …

Member Avatar for Elixir42
0
369
Member Avatar for Elixir42

Hi I dont understand why this int keeps corrupting ::Draw works fine but the variable m_EndRow ends up as a funny number. The class is supposed to print debug info to my screen. ::AddText adds a row of text which is then printed in DrawTable. Simple problem if you already …

Member Avatar for Elixir42
0
165
Member Avatar for Elixir42

Hi sorry for yet another circular inclusion problem but I need help understanding why I cant add a new class CSprite to my project that inherits CShape. I get an error C2504 base class is undefined. I've tried so many permutations of including files. Also can anyone suggest a neater/efficient/correct …

Member Avatar for Elixir42
0
1K

The End.