I've recently read up quite a bit on IEEE 754 and the x87 architecture. I was thinking of using NaN as a "missing value" in some numeric calculation code I'm working on, and I was hoping that using signaling NaN would allow me to catch a floating point exception in the cases where I don't want to proceed with "missing values." Converse...
Hi, guys,
I am developing a tool drawing primitves with DX9 in my XP-32.
When create vertex buffer and index buffer, there could be some error of creation failed.
Return code could be D3DERR_OUTOFVIDEOMEMORY or E_OUTOFMEMORY.
I am not sure what the difference of them.
I use VideoMemory tool in DX sample to check the memory, and it r...
Hi. Im working on an assignment for one of my classes. Simply I have a GumballMachine class and a bunch of State classes that change the state of the GumballMachine.
Here is the offending code:
class GumballMachine;
class State {
public:
virtual void insertQuarter() const = 0;
virtual void ejectQuarter() const = 0;
virtual void tur...
I need to draw a column of vertical text (in Japanese language - it is drawn top-to-bottom instead of left-to-right) in my native C++ Win32 GUI application. I've looked through MSDN and only found how to draw right-to-left text.
How do I output top-to-bottom text except drawing each character separately?
...
I'm learning C, and I want to use the Windows Forms tools in Visual C++, so I can do Rapid Application Development with C. I've tried changing the compiler mode to C, but then, I can't use the RAD tools in VC++, it seems.
...
I have an MFC application developed in VS Studio 2008 which reads and writes to a JSON file in its installation folder. It works perfectly in vista(administrator) BUT ONLY when UAC is turned off. When UAC is ON, the application isn't able to write to its JSON file. I figured I had to create a manifest file but I haven't really tried crea...
Hello,
I've downloaded source of an opensource C++ project. It is a Linux project. As Visual Studio is my favorite IDE I want to use it to browse & study the code. I created an empty C++ project and now want to add the source code to Solution explorer.
How can I add the directory structure to "Solution Explorer". Dropping the root fol...
I am compiling 2 C++ projects in a buildbot, on each commit. Both are around 1000 files, one is 100 kloc, the other 170 kloc. Compilation times are very different from gcc (4.4) to Visual C++ (2008).
Visual C++ compilations for one project take in the 20 minutes. They cannot take advantage of the multiple cores because a project depend ...
I noticed the following about a library I use:
Library is compiled to .lib file.
My code needs to be compiled as Multi-threaded (Debug) DLL to link to this library.
I open the .sln (solution) file of the library (it is open source) and see the following in its Project properties:
Runtime Library option is set to Multi-threaded (Deb...
What are the ways to run .exe binary of a remote server on the remote server from a c++ application in windows platform??
...
I'm running into a bit of a problem here, I'm messing around with machine code and function pointers, and there's a bit of my code that VC++ simply refuses to compile.
This compiles and runs exactly as expected:
#include <stdlib.h>
#include <stdio.h>
int main()
{
char tarr[] = {0xb8, 222, 0, 0, 0, 0xc3};
int (*testfn)() = tar...
While compiling C++ code that is cross platform, g++ throws a compiler error if a .cpp or .h file does not have a newline at its end. Is there a visual studio setting that would do this automatically?
...
Hello,
I'm working with CMake, and my program compiles fine with g++. However, I also wish to compiled it with bcc32 and cl.
I am running into an issue -- I'm telling cmake to use those compilers by doing a command line somewhat like "cmake -DCMAKE_CXX_COMPILER=cl" or whatnot, and it picks up the compiler correctly (ie, in that case, t...
Hi,
Im using WPF controls as C# dll in VC++.Im having Tabcontrol with three tab items.Two tabitems contains buttons only and third tab contains Listbox.Im sending data to Listbox from my VC++.So i did coding like this
ref class Globals1
{
public:
static System::Windows::Interop::HwndSource^ gHwndSource;
static Tabcontrol::Tool...
I am using VC++ 2008 express edition for C. When I try to run this:
/* Demonstrates printer output. */
#include <stdio.h>
main()
{
float f = 2.0134;
fprintf(stdprn, "This message is printed.\n\n");
fprintf(stdprn, "And now some numbers:\n\n");
fprintf(stdprn, "The square of %f is %f.", f, f*f);
/* Send a form feed */
fprintf...
I wrote some very simple code since I'm just starting C++ and I want to get warmed up with the syntax and compiler before our binary tree assignment.
#include <iostream>
using namespace std;
int main(){
cout << "Hello";
return 0;
}
The only output I'm receiving is:
1> Build started: Project: First-BinaryTree, Configuration: Debug...
im now developing a project using winpcap..as i have known packets being sniffed are usually fragmented packets.
how to reassemble this TCP segements?..any ideas, suggestion or tutorials available?..
this i assume to be the only way i can view the HTTP header...
thanks!..
...
Up until now in VC++, when I want to see everything I do :: . This shows all of my objects. Is there a way to make it like c# so it checks as you type without needing :: . Thanks
...
Whenever I compile SQLite with Visual C++ 9 I get hundreds of warnings, such as
potentially uninitialized variables
conversion from wider integer types to narrower integer types
signed/unsigned integers mismatches.
I'm not alone - there's an SQLite FAQ question specifically about that. The answer to that question says that
those wa...
Hi All,
Is there any way to read/extract data from sql server backup file without restoring it?
Thanks.
...