Today will be the first evening for an engineering class... I've already previewed tonight's lecture material that includes some sample C++ code.
I took C++ ~10 years ago. Haven't used it...
I know this sounds like an obvious homework question, but I assure you it isn't. (See my question history.) It's related to doubling the size of a hashtable.
The fastest way I've found ...
I am having trouble converting an array of chars to an array of ASCII values. I have tried implicitly converting them, cast them with int, static_cast them, and haven't gotten anything to wor...
I would like to use the ms embedded visual C++ tool. May i know is there any tutorials for it??
Thanks.
Hello,
i have a pointer to a wchar_t value and want to copy that value into a string. i thought i could do it like this:
std::string s = (char*) pointer_to_wchar_t;
i figured out that...
:
I have a singly linked list called wList where each node's data member contains a string (char*). Do you know how I could sort this list alphabetically?
Windows 98 OS
I need to sort vertices in space by either x,y, or z position. Here's my vertex data class:
class VERTEX3
{
float x, y,z;
};
I hold all my vertexes in an stl vector:
vector<VERT...
How can I get the Message description of an error returned from a call to WsaGetLastErorr (in run time)
I am using some code i found to capture the stdout when using CreateProcess. I am not getting anything, and not sure if my process is even running although i get no errors. One thing i am th...
I have try to write the code to move the camera around an object,but i only achieved that by using keyborad. How can i do it by using the mouse? like when u click the mouse button and at the s...
I have a very simple little function:
int __stdcall Plus(int Val1,int Val2)
{
return (Val1 + Val2);
}
But.. I want, it:
char __stdcall Plus(int Val1,int Val2)
{
return (Val1 + Va...
I am trying to pass a multidimensional array into a function, but I cannot get it to work. I have tried several methods that I found on teh interent but none work. Could someone please post so...
I am developing a cross-platform thread library for use with a card game server that I am designing. I am familar with programming threads in Java and Windows API. I would like to implement ...
Hello,
could you tell me how to use std::pair? I guess, that it's something similar like map, but I can't find quite nothing about it. You can post me link with some examples, and description...
I need to know if anyone knows why I am not reading the file words.txt into the read() function. This is what I have! It should go to the read() function and a list of words should be placed...
Hi,
i have a problem in C++ under Linux.
I want to run an .exe file in a C++ programm under Linux (i use Suse 9.1).
(under windows , i used system("file.exe"); and it works, I tested this ...
I have a question about the randomize function in c++. I have a population of agents belonging to a class. When they are first constructed they are assigned some randomly generated values (say...
i'm suppose to create 5 processes, each an instance of notepad.exe. A digit (between 1 and 5) should b displayed every second. e.g if 3 processes are opened, it should display the digit 3 ever...
Can anyone explain to me the difference between dynamic casts and static casts? For instance, I'd like to see an example in which static casts wouldn't work.
-- Slarti
Consider the following:
enum model_name {
value1,
value2,
value3,
.
.
} object_name;
object_name apparently looks like a variable name. If it is specified, what is it fo...
I wanna get the system time in unix, what unix api should I use? seems ctime....can't get the following result
i don't want to write a function to map the JAN/FEB..etc to 1/2......
expected ...
Hi,
How can I make a pointer to the following table:
const int test[2][2] = { {1,2}, {3,4} }
Like this?
const int ** ptr = test;
Thanks!
Hi,
I'm trying to register my dll and i get the above error message.
The dll name and path are spelled correctly, and when I open the dll with "depends", there is no other missing dll that m...
I would like to list the contents of a directory using c++, but I am at a loss as to how to go about doing this. I do not know if there is a header I could include to make thing easier.
Th...
I have a HBITMAP that I want to save out to a Bitmap file. How do I do that?
HDC hdcCompatible = CreateCompatibleDC(hNextPage);
HBITMAP hbmDC = CreateCompatibleBitmap(hNextPage, sizeImage...