I'm using a function (part of mysql C api) which returns a char*, but I need a wchar_t*. What is the best way to convert this?
How do I convert a float into a string with a precision of 2?
Example:
float x = 1.235;
string s = ? // s contains "1.24" or "1.23", rounding doesn't matter
I know what it's for, but I never really use enum for anything, so here's my question:
I am working on banking software. I have a base class that has an account core type member. It's an ...
Hi,
I wanna know how to convert a string to int.
char DataBuf[200];
int Temperature;
char TempStr[2];
TempStr[0] = DataBuf[100];
TempStr[1] = DataBuf[101];
How can I get Tempe...
Hi all,
Having an __int64 value representing a millisecond time since January 1, 1970, 00:00:00 GMT, how can I convert it into a string representation of format yyyyMMddHHmmssSSS (milliseco...
I have taken several intro to programming classes like Java, C and C++. I have had to develop many console applications since I started these courses. The one thing that I always hated was, ...
how do i write a Win32 Console application that starts a new process. That process should be an instance of Notepad.exe. The program should output the Process ID of the created process. Onc...
Hello!
I want to create a simple Win32 Application...
I coded some part of it... Now I have a problem...
In my code I have this:
#include "stdafx.h"
ATOM MyRegisterClass(HINSTA...
Thanks Snoegler.
Reply:
I was hoping someone could provide some insight as to how I can solve this, not write the code for me. This is my code, but the final result is a half diamond, not...
I plan to test a short complete NT SERVICE program as listed inside MSDN, but after installation in the NT Service, I cannot start it or debug in the console application, with the error messa...
Hello,
I am trying to open a .raw image file stored on my hard drive in a C++ program to manipulate it.
After opening the file, want to save its pixel information in a 2-D array. The imag...
Greetings All,
I have a binary file that I need to read into a data structure, then insert into a SQL Server database. There is no header in the file. The binary file holds 496 records at...
Hi,
I built a solution made of dialog based application and 2 dlls using visual 2005 c++.
the application works fine on my computer but fail to run on other computer that does not have visua...
i created a service.
installed it
i get an error 1063 when trying to start the service using StartServiceCtrlDispatcher();
what have i done wrong?
see the my code below.
thanks
ef...
hi, does anyone know an implementation of strassen's matrix multiplication algorithm?
with source, of course
I have a class definition that goes something like the following. In the constructor of derived classes, the structArr[] array needs to be initialized with an unknown number of structs, each ...
I'm currently trying to develop an application that can generate keystrokes into another existing application. I've read around a bit and found that SendInput() is probably the function I nee...
Can some one tell me where I can find a full list of the error codes returned by Winsock, when I try and send data via my socket I getr the following code : 4358532 can someone post a URL with...
I am looking for C/C++ code to convert a Unix timestamp (seconds since Jan. 1, 1970) , e.g.
1193060347
to a human-readable date format, e.g.
Mon, 22 Oct 2007 13:39:07 GMT
Hi.
Any DLL I code and compile in Visual C++ in VS 2008 I get problems with it.
It needs MSVCR90.DLL as you see in Image, but I don't know why and it not exists in ANY PC. Why it should ...
So I'd like to capture an image from a webcam every 30 seconds or so... I'd like for it to run as a service automatically...
Can anyone point me in the right direction or paste some code s...
Hi,
Is there any way to read in a text file as UTF8 format. Or store it in a UTF8 buffer? Thanks.
Perry.
P.S. This is extremely urgent so I'm awarding it 500 points.
Hello, how do I convert from IP address to network byte order and then back to IP address using char and long?
I have:
char ipaddress[15]='127.0.0.1';
long x;
x=inet_addr(ipaddress);
...
I'm trying to decode either of the keys - ProductId or DigitalProductId - from the registry to get the Product Code needed to install Windows. Both keys can be found here:
HKEY_LOCAL_MACHI...
I have problem again :
Below is the code:
#include <iostream>
#include <string>
using namespace std;
char* day()
{
char* days[7] = {"Sunday", "Monday", "Tuesday"};
return (...