15,550 Topics

Member Avatar for
Member Avatar for e1fjl

Right, I am attempting to parse a DNS reply, an IPv6 one specifically. The ip is split up into its segments with two bytes used to represent each segment. I have a pointer to the data, currently an unsigned char *c. I have tried simply setting an int to equal …

Member Avatar for e1fjl
0
102
Member Avatar for Barefootsanders

Hey everyone, I'm attempting to write a program that will contain multiple C-DLLs. I currently have 2 structs: [CODE] struct CDLL_Node { char value[30]; struct CDLL_Node *next; struct CDLL_Node *prev; }; typedef struct CDLL_Node node; struct listHolderRecord { char label[30]; struct listHolderRecord *next; node *headAddr; }; typedef struct listHolderRecord listHolder; …

Member Avatar for Barefootsanders
0
90
Member Avatar for marzuki

Dear all; I want to sort and class the random data by using C programming. The below are example of th data: Diameter Velocity 0.05 1.0 0.05 1.2 0.15 2.2 0.05 1.2 0.25 3.1 0.35 4.3 0.25 3.1 0.35 4.3 0.45 5.7 0.15 2.2 0.15 2.0 I want to get …

Member Avatar for Ancient Dragon
0
82
Member Avatar for matt nagel

Hi there, I am fairly new to programming and trying create a program to parse csv data into an array. I have been following an example I found on this site but I am running into a segmentation fault (even if I copy code directly). I am fairly sure the …

Member Avatar for Duoas
0
7K
Member Avatar for camberos

ok i hope someone can helpme i need display a menu like a presentation page Name Adress Phone using assambly code, but when i put asm{ name db 'homer simpson','$' adress db 'everygreen','$' phone db '555-555', ..... mark unknow assambly code name db ...... I using TC but i need …

Member Avatar for camberos
0
92
Member Avatar for MardukLitzer

Hello All, I'm having difficulty detecting the 'LVN_COLUMNCLICK' message from a ListView control. I am entering the WM_NOTIFY for sure, but I can't trap the LVN_COLUMNCLICK. Not sure where else to look, my code seems to follow what is listed on MSDN and just about every snippet I've found. Any …

Member Avatar for Ancient Dragon
0
113
Member Avatar for Nemes

Hello, I am running a heuristic search algorithm (running on Windows XP), and at each iteration, I want to write results in an output file. The issue that I have is that after a number of iteration, my program crashes at the line where I have the "fputs(str, f);" (See …

Member Avatar for Ancient Dragon
0
470
Member Avatar for controlsi

[Code=C] #include <stdio.h> #include <stdlib.h> #define SIZE 5 #define MAX 10 void fillArray(char arr[][MAX]); void printArray(char arr[][MAX]); int fileOpen(void); int main(void) { char arr[SIZE][MAX]; int success; fileOpen(); if (success == 1) { fillArray(arr); printArray(arr); } else printf("File access failed"); return 0; } int fileOpen(void) // ** this were i am …

Member Avatar for WaltP
0
128
Member Avatar for asilter

i have 2 executable files. From one of them i'm calling the other one. it is also executed correctly, but does not return 0. why? backup.c file : [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <unistd.h> #include <mysql/mysql.h> int main(int argc, char * argv[]) { if(!execl("/home/user1/exec_work/binary","/home/user1/exec_work/binary","serdar","ilter",NULL)) { …

Member Avatar for Duoas
0
114
Member Avatar for mank

I want to parse a tree the tree is like (((1,2)3,4)5,6) see the attached parse tree the program would produce an array from root to each leaf [URL=http://allyoucanupload.webshots.com/v/2002642992068581724][IMG]http://aycu25.webshots.com/image/35944/2002642992068581724_th.jpg[/IMG][/URL] So I would like to have 4 arrays [CODE] a[]={5,3,1} b[]={5,3,2} c[]={5,4} d[]={6} [/CODE] I would like to have a general format …

Member Avatar for Narue
0
102
Member Avatar for funkyjohny

Can anybody do this; The algorithm of Chang and Roberts achieve the 0(NlogN) (N the number of nodes) complexity of messages in the medium case, but at worst however it achieves 0(n^2). The algorithm of Peterson of/Dolev-Klawe-Rodeh achieves complexity of messages the O(NlogN) at worst situation improving the algorithm of …

Member Avatar for Salem
0
152
Member Avatar for r5ingh

Hello, i'm a noob C programmer, learning it at university. We have been given an assessment which i need to complete asap. I have figured out the solution to the porgram (almost) but need some assistace. I have a Java and VB background and i cannot seem to get my …

Member Avatar for r5ingh
0
416
Member Avatar for iamconfused

[U]Hello...[/U] First of all hello to everyone... this is my first post. I did some 'googling' for help with C code and found this place, the reason I need help is because I am working on a (what I consider hard) project and (only) a week and a half to …

Member Avatar for iamconfused
0
214
Member Avatar for deitystrife

I have finished an entire program but there is one small problem with a bit of error trapping. [code] while((((payment/.01)-(floor(payment/.01)))>0.0) || (payment<0.0)) { printf("You can't pay with fractions of one cent! You can't pay with negative amounts! Please type in your payment "); scanf("%f", &payment); }[/code] In this little bit …

Member Avatar for Duoas
0
89
Member Avatar for adikesan

Hi I want to know about the use of linked list in C and also about its working and syntax. Please tell me about this.

Member Avatar for rajusankar28
0
120
Member Avatar for enuff4life

in my function OpenData, it corrupts error on memory allocation when I compile and run it. in main, i need to creat an int array and pass it to other function lator.. I take 4 command-line arguments ie, a.out 7 100 lychrels.dat 7 is seed number 100 is number of …

Member Avatar for enuff4life
1
175
Member Avatar for boyz

the address of the array is contained in the array name that is a pointer to the array it means when we are declaring an integer array a[5] we are getting 10 bytes for the array elements and two bytes for the pointer a? means 12 bytes are occupied in …

Member Avatar for Ancient Dragon
0
226
Member Avatar for kiel19

how to write c code function implementing the first heuristic algorithm [CODE] void binpack_firstfit(int item) { int s = 0; int bin_Value; do{ bin_Value = bins[s]; if (bin_Value + item < BIN_VOLUME){ bins[s] = bin_Value + item; s = NUM_BINS; } }while(s++ < NUM_BINS); }[/CODE]

Member Avatar for Salem
0
140
Member Avatar for spaceintheworld

hey I would see on the screen like that UNDER THE mınumum array IT SHOULD WRITE MAX OR MIN WHATEVER YOU CHOOSE for example if we write 2 arrays 3.4 5.6 0.6 8.6 it must write on the screen " Arrays 3.4 5.6 0.6 8.6" MIN MUST WRITE UNDER 0.6 …

Member Avatar for spaceintheworld
0
91
Member Avatar for Jishnu

Hey, what does the following code do? [CODE]#define _ -F<00||--F-OO--; int F=00,OO=00; main() { F_OO(); printf("%1.3f\n",4.*-F/OO/OO); } F_OO() { _-_-_-_ _-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_ _-_-_-_ }[/CODE] I found this interesting question from [URL="http://www.techfest.org/archives/tf07/wired_logic/codemaestros/code.c"]http://www.techfest.org/archives/tf07/wired_logic/codemaestros/code.c[/URL]

Member Avatar for Jishnu
0
213
Member Avatar for emilio

hello i have a warning error : passing arg1 of srtcmp makes pointer from integer without cast. here is a part of the code : int calc ( char s[] ) { int size = strlen(s) ; int flag = 0 ; char op ; char add[] = "+" ; …

Member Avatar for Ancient Dragon
0
110
Member Avatar for enuff4life

i get command-line arguments argv[3], but i need to pass it to function... the sample input would be a.out 7 100 lychrel.dat [CODE=C]int main(int argc, char*argv[]) { int *array, randomNb, arraySize; int i, judge, counter = 0, iteration = 0; int total; if (argc !=4) { fprintf (stderr, "This program …

Member Avatar for Ancient Dragon
0
76
Member Avatar for enuff4life

when I call this function in main, I need to convert the 'longlong num' into string and RETURN the string... so in main [code=c] main() { char string[20]; ........ string = LongLongToString(random); } char LongLongToString(long long num) { int counter = 0, i; char string[20]; while(num !=0) { num = …

Member Avatar for Ancient Dragon
0
135
Member Avatar for boyz

1.main() 2.{ 3. int a=0; 4. while(...) 5. { 6. int a=9; 7. } 8.} now friendz question is question is what make a of 3 global and a of line 6 local what is happend at the time of local decla.. and at the time of global decl... would …

Member Avatar for Salem
0
95
Member Avatar for ssriram

Hi all, I need to write a code in C to send AT Commands that to be appear in Hyper Terminal? I need some sample code in C. Plz help. With Thanks Sriram

Member Avatar for ssriram
0
47
Member Avatar for Jicky

Can we draw graphics on screen by directly pappping the graphics memory using pointers if yes how to find the starting address , word length ,resolusion etc?

Member Avatar for Salem
0
105
Member Avatar for boyz

Can we add two long number using linked list. If Yes then please write a simple code......

Member Avatar for WaltP
0
98
Member Avatar for boyz
Member Avatar for Jishnu
0
77
Member Avatar for boyz
Member Avatar for boyz

This is different question...can anyone tell...we shld get some text as output hope u can get the question........... dont use any aruments or anything in or on main() we shld juzz keep main() function main() { } dont use C++ or any other..use only C... and this has solution.....frnds help …

Member Avatar for doublex
0
89

The End.