15,540 Topics

Member Avatar for
Member Avatar for mailsteam

[CODE]#include<stdio.h> void myalloc(int **b) { *b=malloc(sizeof(int)); **b=10; printf("**b=%d\n",**b); } main() { int *a; myalloc(&a);// is this convention is correct? printf("*a=%d\n",*a); }[/CODE] i have not initialised *a. can i pass the &a(address of a pointer) without initialising it. Please look at my small program and help me out. is it a …

Member Avatar for mailsteam
0
77
Member Avatar for HS20064972

I need someone help me and share a programe 2 me.Help me... ok... Peace..:sad: thanks for your idea...

Member Avatar for ~s.o.s~
0
137
Member Avatar for amishosh

Hi! Here's my code: [code] for(i=0;i<N;i++) { for(j=0;j<M;j++) printf("%4.2f ",mat[i][j]); printf("\n"); } [/code] I want it to look like this: 68.85 52.25 32.00 -100.00 -632.25 -26.56 Instead I get: 68.85 52.25 32.00 -100.00 -632.25 -2.56 For life of me I can't remember how to get th alignment right. Anyone? Thanks

Member Avatar for Ravalon
0
81
Member Avatar for whitemoss

Hi All, Im currently try to write a code to read the data from mysql tables and then write the contents into a text file. Below is my code. I dunt know what's wrong with this code because in the text file created, there is no data from database written. …

Member Avatar for Ancient Dragon
0
247
Member Avatar for amishosh

I want to create the effect of a moving square. I would have to clear the previous position of the square and then draw a new one, right? And if that's tru how do I clear just that portion of the screen leaving the rest of my screen in tact? …

Member Avatar for John A
0
85
Member Avatar for caltiger

Hi, i would like to know if there r any native functions in C with which i can detect a keypress ( independent of the platform ). The same ofr mouse functions as well.. Any function to detect a mouse click? If not, how to detect a key press... ? …

Member Avatar for apurv
0
649
Member Avatar for gauravji

Hi , I want to create a dll using the cpp file. I have followed some steps which I got from the some forums and tried to create a dll and it throws the following errors. [code] ********************************************************** islicenseviewed.cpp(19) : error C2146: syntax error : missing ';' before identifier 'CALLBACK' …

Member Avatar for Ancient Dragon
0
230
Member Avatar for wayani

Hi. My name's Brianne and I just now started this semester taking Programming, Logic and Design. I have a homework problem, and what blows is this class is online, so I have to read the book, and write 100 times to get something down ... and I just don't get …

Member Avatar for WaltP
0
255
Member Avatar for amishosh

Is there an output function in C that keeps the cursor ON the last char printed and NOT after it? (Aside from using gotoxy(wherex()-1,y)) Thanks Ami

Member Avatar for amishosh
0
78
Member Avatar for Jishnu

Does anybody here know how can i manage global data in multifile C programs ? Plz do reply.

Member Avatar for jwenting
0
190
Member Avatar for Manojsah

Respected Viewers, I have to implement Network File System (NFS) . Could any of You Guide how to do that. I have to create my own shell having server as well as client performing some function like mkdir(), open(), create(), read().... etc regards

Member Avatar for Mark C
0
171
Member Avatar for VIDHYAPREM

hai everybody, know only i start learning c program,while compiling any program i have the error "[B]stdio.h was not included"[/B] even any header file it may math.h,conio.hstdlib.h etc,we include in our program it show this error [B]"you header file is not included"[/B] [B]how will i rectify the error.[/B] [B]Thanks in …

Member Avatar for ~s.o.s~
0
91
Member Avatar for dukiduki

Hmm,first sorry for some grammar mistakes... I have a big problem with graphics in C... For 2 days i'm looking on internet and nothing...I saw some theards and posts but none of the lib didn't work...(It was forums on my language ) I'm working in VS 6.0 I saw here …

Member Avatar for dwks
0
214
Member Avatar for mehakkapur

If you have to count numbers of 1 in a 32 bit word. Other than checking every other bit or dividing the bits is 4 parts and then using lookup table. What will be some other most efficent way ?

Member Avatar for Ravalon
0
94
Member Avatar for degamer106

i've been trying to use fscanf to parse parts of a line from a file. The format of each line is like the following: Connecticut,1788,Hartford,29 I've been trying to use this: [CODE]fscanf( fpIn, "%[^,], %d% [^,], %d", name, &year, cap, &popRank )[/CODE] To extract the state, year, capital, and population …

Member Avatar for Salem
0
76
Member Avatar for hariza

Hi Guys, I wonder if someone can help me out with this. I'm running the same C code in diffferent platforms (windows/unix) but getting different result. For instance the code is: [code=cplusplus] fgets(line,LINE_BUF,fp); while (!feof(fp)) { Len=strlen(line) - 1; if ( (newNode=malloc(sizeof(ListNode))) == NULL) { fprintf(stderr,"\nListInsert: Memory Allocation failed! Aborting.\n"); …

Member Avatar for Dave Sinkula
0
148
Member Avatar for fsemilla

/*****in the book ive read, they gave me a code which will be placed in the .rss file as shown below...*****/ RESOURCE LISTBOX r_demo_listbox { flags = EAknListBoxSelectionList; array_id = r_demo_listbox_items; } RESOURCE ARRAY r_demo_listbox_items { items = { LBUF { txt = "Item1"; }, LBUF { txt = "Item2"; …

Member Avatar for fsemilla
0
115
Member Avatar for rajbasu
Member Avatar for unclepauly

i am using CreateThread to, unsurprisingly, start a thread :p is it possible to return a value? i need to return either true or false at least. ideally i need to return 0, 1 or 2 to indicate the success of certain things that go on inside the thread. I …

0
73
Member Avatar for Racoon200

Hi, i dont know [I]<<edited profanity>>[/I] about C. But maybe you can help me in some really light coding (i think). I want to do a plug in for any RTF editor, like wordpad, in which User-Defined Keywords, are highlighted. In this plugin it will also be possible to save …

Member Avatar for Racoon200
0
89
Member Avatar for Aia

Friends, I have a question: Many times in books and tutorials I'm sent to consult the Standard C Library reference. Sometimes, references are made to some Standard C function. Where do I see the Standard C Library in a compiler. I don't see any source code in my compiler that …

Member Avatar for Dave Sinkula
0
249
Member Avatar for fsemilla

can anyone help me...?? how can i put image in the application box of my program...??? vs.net gave me a default program found in the .rss file but it only says "<put your stuff here>" as shown from this rss file... [code=c] RESOURCE DIALOG r_symbian3_dialog { flags=EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | …

0
76
Member Avatar for neodishanku

Hi all, Can any one point to me how to develop a screensaver in winxp. What language shud i use to write the code. I have browsed the net and found some native code in c. Is this the way to develop. Has anyone played around with it? Looking fwd …

Member Avatar for gcs584
0
626
Member Avatar for Arun_267

Hi, While compiling the code for accessing files from a wacom intuos2 tablet i am getting the following error. This error persists for other programs that i have downloaded from the net. The error is as follows: " File format not recognized ld returned 1 exit status C:\ONLINE\Makefile.win [Build Error] …

0
48
Member Avatar for mpakala

Hi Im trying to use the stl vector to implement a container. The container doesnot need any data and member functions. It should just act as a stack for the objects. But the objects are not homogneous.so I don t think i can use vector. How can I implement this …

Member Avatar for mpakala
0
155
Member Avatar for bops

Hi, I am trying to make a method inside a class that will remove the first 2 characters of a string of characters. Sounds simple enough, I though it was, but actually implementing it took a bit of thought and doesn't seem to work. [code] void classname::removeFirstChars(char * buffer) { …

Member Avatar for WaltP
0
181
Member Avatar for Eko

[URL="http://img218.imageshack.us/my.php?image=sketchmh1.gif"][URL=http://img513.imageshack.us/my.php?image=sketchlw8.gif][IMG]http://img513.imageshack.us/img513/8739/sketchlw8.th.gif[/IMG][/URL][/URL] I have something like this : The reallocation of a piece of memory that works like a circular queues I've made a sketch explaining this ,I hope , very clearly I just need a clue,a tip,something that will get me started , because right now I'm stucked Thx

Member Avatar for Infarction
0
199
Member Avatar for mocherla14

Suppose we have [code=c] main() { try{ while(error) throw 1st excep } catch(1st excep) { if (condition) we have to jump to 2nd excep is it possible? i am unable to send from this catch to next catch. pls help me with codin/example..........? } catch(2nd excep) { ...... } } …

Member Avatar for disc
0
56
Member Avatar for 80s

Hi All :mrgreen: , was mucking about with a small programme I have which makes a triangle pattern when entering in a number. It uses nested For loops. I now want to create the same thing using functions as im only just beginning to learn the C language. I have …

Member Avatar for Aia
0
476
Member Avatar for jan1024188

Ok that might sound stupid, but Id like to know how to get box with error message.... I dont know how to explain what i realy want so here is a screenshot. [IMG]http://www.trendmicro.com/vinfo/images/worm_cydog_a_img1.gif[/IMG] This is error box...How to make it... Can you send me link with sources od this boxes …

Member Avatar for demoniacs2001
0
88

The End.