I have a large character array in c++ and I need to get it into a string type variable. How is this done. I have this so far.
char *tmp1;
string tmp2;
/* read data into tmp1 */
/* tm...
how to get the process name from the PID? (winapi C++ visual C++ 6.0)
I need to translate process id (PID) to process name (such as "notepad.exe")
any idea?
ps
execution speed is...
I recently got charged with updating / modifying an existing C++ DLL. I starting updating some of the functions to their security-friendly counterparts and am running into problems.
It see...
can anyone give me a simple example of converting string to int.
string a="321"
int b;
is there any function in STL in VS++6 which can convert "321" into b=321;
Thanks
I found a simple code on the net about video capturing with opencv functions. However, when i compiled it, it didnt work, cvQueryFrame didnt grab a frame. Actually my camera doesnt a usb camer...
how can we convert a character to a hexadecimal value.And also how can we use charcters apart from latin charcters.for eg
char c ='\ubf25'
is it the right way to use unicode characters.if it...
Connecting to a SQL database using ODBC in C++. The SQLConnect(), function takes DSN name, username, and password strings as its params. I have created a system DSN with a username and passw...
Hey experts,
The itoa function is provided only in Microsoft Visual C++, it is not provided with the g++ compiler in Linux; therefore, if I want to use itoa to convert from an integer to a...
Actually, this question has two parts.
1. Can C++ arrays only hold primitive types such as int, float, etc? Can it hold abstract types such as:
class A {
...
};
int main() {
A...
Hi Experts,
I would like to get the MAC address of the local Linux machine using C++. How can I do?
Thanks in advance!
.VietTrung.
I have a char array, id[15], that I read in from the user's input on the console using cin >> id, and I need to change this into a LPCWSTR. I need the cin to go into the char array because I ...
How to make a STL string Lower case or Upper case?
Is there a function to convert an STL string to Lower case?
I'm compiling my C++ program under Ubuntu 6.10 using KDevelop. Unfortunately, it needs to run on an embedded device with no compiler running Debian. I get the error "version `GLIBC_2.4' not ...
im lookin for a decompiler that converts exe (and other files) to C++, anyone know where I can find one? or a name?
--note: i've found some that decompile to assembly or C but what i need has ...
I need a code sample of how to use the CreateThread Win32 function.
i want to get time different in millisecond?
I currently use difftime() to get the different between 2 time but it return in second unit not millisecond.
If i try to *1000 with the value...
Hi,
I recently installed Visual Studio 2005 and trying to bulid an apllication and the application contains a header file called as unistd.h and when I compile the code it says..Unistd.h he...
How do you change a string to all upper case?
string str = "abc";
// change str to "ABC"
I would like to know how delete operator will work on with double pointer...
How can we write codes to create a folder in C++ programming to save our files into it? Any sample codes?
I'm attempting to debug a program in MS Visual Studio but it keeps ignoring my breakpoints and gives the following. Any idea what I'm doing wrong or how I should fix?
Project is compiled f...
How can I initialize the following iterator to an invalid value:
std::vector<char*>::iterator it;
I would simply use:
it = 0;
but it doesn't compile with VisualStudio 2005 (it was OK...
I want to use the arrow keys in a program on a linux machine and am having trouble.
I want be able to capture the key press or key presses if it's held down and the do something.
for examp...
Hello experts,
in my C++ program (console app) I need to convert a LPWSTR to CHAR*.
---
//*********************************
wchar_t *pServer = L"\\\\mycomputer"; // server to run on
...
I am attempting to read a record from a (.txt) file. The layout is:
int ID;
char name[21];
double Payrate;
int dependents;
I am using the code block below:
while (!masterFile.eof(...