15,552 Topics

Member Avatar for
Member Avatar for FC Jamison

Last quarter our last assignment was to create two programs that gernerate silly sentences from words contained in a file. I was able to create the program with a map, but have no idea how to do it with a hash map. Since it was the end of the quarter, …

Member Avatar for iamthwee
0
177
Member Avatar for hkBattousai

I want to create a low level keyboard hook. I tried the code below : [code]LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode < 0) return CallNextHookEx((HHOOK) WH_KEYBOARD_LL, (int) nCode, (WPARAM) wParam, (LPARAM) lParam); DebugText("KB Event!"); return (LRESULT) NULL; } HHOOK hHook; hHook = (HHOOK) SetWindowsHookEx( (int) …

0
66
Member Avatar for afr02hrs

Can anyone spot the semantic error in this triangular number calculator here? It correctly reports 21 as being a triangle number but incorrectly that 15 is not a triangle number. However if you input 15 as the first value entered it correctly says that 15 is a triangle number!! [code] …

Member Avatar for John A
0
152
Member Avatar for i_like_pi

Does anybody know how to use integers larger than the "long long int" type? I have tried using arrays of ints, but mathematical functions are impossible. Thanks in advance. :cheesy:

Member Avatar for i_like_pi
0
89
Member Avatar for jan1024188

Hello, Id like to know how to merge two files: icon.ico and file.exe thanks in advance, Jan

Member Avatar for jan1024188
1
114
Member Avatar for Tales

I have a little annoying problem and I really need help. I need to convert a char* to TCHAR* and I can't... I have tried everything and nothing seems to help... TCHAR text1[ ] = ""; char *key; key[0] = 'a'; key[1] = '\0'; text1 = _T(key); //Does not work …

Member Avatar for dubeyprateek
0
253
Member Avatar for Chimera

[CODE=c]#include <stdio.h> #include <string.h> #define MAXLON 10 #define N 6 int main(void) { int opcion, elocal=-1, evisitante=-1, resultado, lista_puntos[N]={0,0,0,0,0,0}, i, o, ganador; int resultados[N][N]= {{-1, -1, 0, -1, 2, -1}, { 1, -1, 1, -1, -1, 1}, {-1, -1, -1, -1, 0, 0}, { 1, 1, 2, -1, -1, -1}, …

Member Avatar for Chimera
0
244
Member Avatar for arunk8186

Hi friends, I have written a C program which involves some iterations of numbers that I input in a table. >> Now I want to know how to import these values say from excel or some text instead of me inputtin them.... Any suggestion wil bw very helpful. Thanks and …

Member Avatar for arunk8186
0
130
Member Avatar for gpta_varun

Hi All I have a header file link.h , in which i declare a variable itemp. When i assign this variable a value in the C file link.C i get an error during compilation: cxx: Error: link.C, line 5: this declaration has no storage class or type specifier itemp=0; ^ …

Member Avatar for gpta_varun
0
163
Member Avatar for bigben09

Hey I want to be able to put a movie title in the is more than one world and it goes crazy when i do, if you run my program and enter one word when it asks for the movie title it will work fine. but when u enter a …

Member Avatar for WaltP
0
108
Member Avatar for mohiuddin.shaik

main() { if( ? ) { printf("welcome"); } else { printf("to ieg"); } } ----------------------------------------------------------------------- Output should be welcome to ieg [B]what should come in place of ' ? '[/B]

Member Avatar for John A
0
93
Member Avatar for Tim Gleebitz

Hi fellow programmers. I'm quite new to 'C' and I’ve been working on this personal project recently and have struck a spanner in the works! I am quite bemused by this piece of code I am to assemble (below). I think it’s fairly simple but can’t quite grasp it! Any …

Member Avatar for John A
0
110
Member Avatar for Talkin Tosh

Hi guys, I'm looking for a bit of help with an assignment. I'm not to hot with C but its a compulsury module so what can i do! Basically the assignment wants me to make a record data type, that describes a lecturer. There are different fields are ints, char, …

Member Avatar for Ancient Dragon
0
81
Member Avatar for 123abcd1983

Hi, I have some problem by using the midi file. I wish to control the left and the right channels volumes, and i got some information from msdn library, but it didn't tell me the exact way to do it. Could anyone tell me what is the meaning of [B][I][COLOR=sienna]"The …

Member Avatar for WolfPack
0
491
Member Avatar for ferrant

Hi, I am getting warnings when I export a class that contains an STL deque. Note that for a simple stl vector there are no warnings, only for the deque ... I applied the rules defined on the msn page : [url]http://support.microsoft.com/kb/168958[/url] But still get a compile warning that I …

Member Avatar for ferrant
0
208
Member Avatar for muggle_spy

I M A Program Beginner In C. Can Any 1 Help Me Wid How To Create Files In C.

Member Avatar for Ancient Dragon
0
51
Member Avatar for endsamsara

Hi. How can [B]I assign an structure with values[/B] in its fields name=doom memory=1212, time=12, files=2; but dinamically??? so i use malloc sixe of [B]the list does not begin in NULL instead "doom[/B]" i have a menu that insert a new Node, when you press F1 printinscreen when you press …

Member Avatar for Ancient Dragon
0
121
Member Avatar for bashar2007

Hi programmer I am trying to develope aprograme to solve an equadratic equation in , but I still get error output . Any one help me please . bye Bashar

Member Avatar for Ancient Dragon
0
33
Member Avatar for delner

So I'm trying to write a program to simulate Conway's game of life. I thought it'd be cool to declare a class called Cell and use an array of objects instead of an array of ints or bools. My problem is that when I go to compile a function to …

Member Avatar for Salem
0
73
Member Avatar for tripo03

I´ve been programming a B tree structure in C and i had problems because I programmed it in Debian Sarge and when I wanted to compile the source code in other distribution of Linux the program did not work correctly... The IDE i used is Anjuta... Anybody has idea why …

Member Avatar for Salem
0
98
Member Avatar for ndeniche

Hi... I have been trying to figure this out, but it has been an impossible task 4 me...:rolleyes: this is a gasoline pump counter, and i have developed an infinite cycle to print the gas counter and the cash counter...:mrgreen: the problem is, i need a stopper for the cycle, …

Member Avatar for thekashyap
0
393
Member Avatar for amt_muk

Hello Friends, Suppose I have a function like - [code] void myFunc( char* str) { ....... ....... } [/code] And I have to pass a pointer of type "const char*" into that function. Now my question is that can I pass the pointer like following way (ie by custing it …

Member Avatar for amt_muk
0
200
Member Avatar for h_howee

I'm working on a "breakout" game and everything worked fine until i tried to add in double buffering. I tried to take out double buffering since i couldn't get it to work and now, it draws everything from the top left corner of the screen instead of in the client …

Member Avatar for h_howee
0
124
Member Avatar for potato_bum

hi im asked to read data inputs from a text file in c. my problem is i dont know to separate the values, ex. may data contains these: 1.00:2.00:3.00 i would like to assign the values a = 1:00, b = 2.00, c =3.00. how is it done? thanks!

Member Avatar for Ancient Dragon
0
107
Member Avatar for RisTar

Hi, im trying to create a program that will control a dynamic array . The program have few functions to handle dynamic array. * Add number to array * Erase number from array * Print the array I have two problems with my code . The first one is with …

Member Avatar for thekashyap
0
171
Member Avatar for fatboysudsy

hi all, I have been struggling for a while with my client/server program. I have to authenticate in order to log on correctly. I have managed to get most things sorted, asking for username ( which is a long integer (12) ) and also and customer ID (also an int …

Member Avatar for Ancient Dragon
0
111
Member Avatar for Sabi_146

Write a complete program to implement the link list operations as following. a. Write a routine to make two lists L1 and L2 with 5 elements given by the user at run time. Or add two lists with its elements in the main function. b. Write a routine to compute …

Member Avatar for ~s.o.s~
0
85
Member Avatar for hbk619

I got this code (written when sleepy, sorry for lack of "expertness") [CODE]#include <stdio.h> #include<time.h> int card1; int card2; int card3; int total; int other; srand(time(NULL)); card1=(rand()%22)+1; card2=(rand()%22)+1; other=(rand()%22)+1; total=card1+card2; int main() { printf("Hey, welcome to HBK's Twist or bust game. Lets begin\n"); printf("Your cards are: %d and %d\n", card1, …

Member Avatar for hbk619
0
2K
Member Avatar for rwagnes

I am writing a short program in c on a linux platform which takes an argument from the command line. My only problem is retrieving that argument. It is an integer. Here's what is currently in my code: int seconds = *argv[0]; Thanks :cheesy: EDIT: Here is the rest of …

Member Avatar for rwagnes
0
165
Member Avatar for kirogthar

Firstly hello every1 this site helped me a lot with my ANSI C learning program... I am currently working on an homework about Binary sum, I explored the website and saw the binary - decimal conversion codes and they helped me a lot. But i seem like can't write the …

Member Avatar for Ancient Dragon
0
34

The End.