Search:
Type: Posts; User: dis1411
Search:
Search took 0.26 seconds.
-
I realize preprocessor directives are just a text replacement.. however once its in the code, it should then be optimized.
I figured out the correct answer. 2^16 is not 2 to the 16th (65536) its...
-
i had
#define DATA_SIZE 65536 and decided to change it to
#define DATA_SIZE (2^16) // 65536 I thought for sure my compiler would optimize that to a literal constant (65536) but instead it actually...
-
id_num[size] should be '\0'
-
as for memory allocation, your best solution is probably this:
perform a 'dry run' just to see how long the output string will be
do a single allocation
do another run, this time actually build...
-
well, if we're going to give him the answer we may as well do it right
#include <iostream.h>
#include <stdlib.h> // rand(), srand()
#include <time.h> // time()
int main()
{
int i;
-
it's not as if the use of dialog templates is limited to MFC
-
how is input being assigned?
-
try
#include <iostream.h>
//using namespace std;
int test(int x, int y)
{
cout << x << " " << y << endl;
-
you might consider using a switch statement.
as for the code posted.. we're gonna need more info
-
the code as is should return 6... i suggest putting code to report the values of x and y at the top of the function
-
compiled vb6 code is pretty obfuscated
-
VB .NET runs on C++. 'nuff said.
edit: oh, C# also.
-
myclass
{
public:
int myvar;
};
-
you only need wmi for the cpu id.. the other things you mentioned can be found fairly easily.. a google search will yield many examples
-
incidentally, i believe to store something in y you do y->whatever
-
int(x + 0.5) will do the trick
-
include winsock before mysql
-
i really wouldn't bother with mysql++
go to mysql.org, grab the full installer. when installing, be sure to check that you want the source installed too. also grab the admin gui tools.
setup...
-
c# is a ways away from c++. there are several c# conventions that would be considered poor form in c++
-
try
char str[100] = {0};
or better yet
WriteFile(hFile,row[2],(DWORD)(strlen(row[2])),&wmWritten,NULL);
-
are there any memory allocations within a loop? might be a good place to start.
also, you are paying a price for having the db be 'human readable' in its raw form. you may consider changing the...
-
a screenshot would be helpful
-
let's hear what people use for declaration of datatypes / control handles etc
eg
nCount
chkHeavy
-
-
in the 'edit area' try clicking the text of the group box
-
you can use MFC as a static library and the exe won't need anything extra to run
-
i would agree with penagate... however i am providing a simplified situation.. so ignore compiler omptimizations
-
bool func(int* i)
{
return (*i == 5);
}
bool func(const int& i)
{
return (i == 5);
}
-
Hardware .. it just keeps getting Faster ....
i suppose you were also shocked to see that doom 3 doesn't run well on a p2
-
the memory usage is misleading in vista... i until recently had 512 MB of ram and vista would quickly report using say 400-500 MB... however i could load and run apps with good speed.
now, if...
-
as long as the program works, what difference does it make to the customer?
-
Vista should eventually come out in CD version.. which IMO is much more hassle than the DVD
also, I'd recommend installing it on a spare system until you're confident you can get all your...
-
-
throw me a pm detailing what is to be done
-
ver 1
#include <iostream.h>
#define WATER ' '
#define WATER_SHOT 'x'
#define SHIP 'O'
#define SHIP_SHOT 'Ø'
#define SIZE 10
-
this could basically get as tedious as you want it to be
if you want a quick and dirty way.. you could do something like this..
#define WATER ' '
#define WATER_SHOT '-'
#define SHIP 'O'...
-
char *myString = "this is my string";
myFunc(myString);
void myFunc(char str)
{
char *head
head = (char*)malloc(strlen(str)+6);
head[strlen(str)+5] = '\0';
-
have you tried WM_KILLFOCUS?
also, try using spy++ to get the style(s) of the of the toolbar
-
yeah, only a .dll can do this. even in c++.
-
|
Click Here to Expand Forum to Full Width
|