Awesome. That helps.
Thanks
Type: Posts; User: elfjuice
Awesome. That helps.
Thanks
It is u_int64_t as defined in sys/types.h (unix).
Thanks for the help. But if my shift method works correctly then I will leave it how it is.
Thanks again.
I've never heard of unions in C. How would that work in this context?
Also.. How could I print a u_int64_t to stdout? %lld doesn't seem to work.
I have a function that retrieves the high and low order bits of the CPUs cycle-counter (Using GCC asm):
void access_counter(unsigned *hi, unsigned *lo) {
asm("rdtsc; movl %%edx,%0;...
Awesome. You guys got me on the right track. Now I can work on some less trivial homework.
Is it just me or are pointers different in C than C++? I always though that if you pass a pointer into...
This is a homework assignment for cs-200. And the function you posted is the exact function I need to rewrite without recursion.
Thanks for the reply. Yes, that is how I'm calling addword(). Except root starts out as NULL. so for the first call the function is just:
struct node*
addword2(struct node* p, char *w)
{...
I'm sure this is a very common problem. No matter how many times I've delt with pointers, they always end up confusing me. Especially in c.
I'm trying to pass a pointer to the root of a binary...
Ah... Thanks, that was, infact, the problem. For some reason I never caught that.
Thanks :)
I was writting a null terminated string class, and it was going pretty smoothly, but my pushBack function seems to not work, here is some of the code:
///////////////// STRING.H...
How would I make a client program that tries to connect to a server, and if it failed, tries to connect again, until it successfuly connects?
Nevermind about the binary question, I answered it myself in oen of my own posts, lol... thanks a lot man!!
Thank you so much! it works great! One question, how can i transfer binary files?
wow... thanks for the great reply!
I got it working, with just one bug...
void sendFileSize(char *filename, SOCKET socket) {
char buffer2[256];
sprintf(buffer2, "%i",...
int sendFile(char *filename, SOCKET socket) {
long size = getFileSize(filename);
if(size == -1 || size == 0) {
//sendCommand(socket, "111");
return -1;
}
FILE *file =...
Here is what I got so far:
int sendFile(char *filename, SOCKET socket) {
long size = getFileSize(filename);
FILE *file = fopen(filename, "r");
char* tmp;
How can I get directory information?
I have a client/server program and I want the server to be able to browse the client's file system, and eventualy transfer files.
But how can this be done?
I've searched the forums and found a couple topics.. but none of them contained answers... one contained borken links to msdn, and i tried to navigate to it manually in msdn but found nothing...
...
Thank you! You fixed my problem
I'm writing a win32 app in Win API, using VC++ 7.0.
So I made my dialog box in the resource editor... and put this code in my main.cpp
BOOL CALLBACK MainDlgProc(HWND hwnd, UINT Message,...
I figured it out myself... if anyone else runs into this from the search function or whatever, the way I did it was.
SetForegroundWindow(GetConsoleWindow());
HANDLE hOut;...
I searched for disabling keys, and i found some stuff about hooks. But I never figured out how to catch keys. And I heard somewhere that ctrl+alt+delete can't be stopped with hooks...
I thought...
ShowWindow(hWnd, SW_SHOW);
SetForegroundWindow(GetConsoleWindow());
keybd_event(VK_MENU, 0x38, 0, 0);
keybd_event(VK_RETURN, 0x1c,0,0);...
Here is what I want the CLIENT to do.
Check and see if the server is up, if not, keep trying until it is.
If the server is up, then connect to it.
If the server goes offline or quits. Go back...
Hey,
How is it possible to force keyboard/mouse buttons down... not physicaly, obviously. But how (in Win32) can I force mouse/keyboard buttons down?
Thanks