15,552 Topics

Member Avatar for
Member Avatar for cutenature

I am trying to free a memory in the main which has been allocated in a sub-function. Is this possible and am i doing this in the right fashion. The code sample is: char* SubFunction() { char *ptr= NULL; char **values; ptr= (char *)calloc( 100, sizeof( char ) ); if(ptr== …

Member Avatar for Chainsaw
0
100
Member Avatar for xxraveteddyxx

how do floating numbers work exactly...im readin about them but i cant seem to understand there purpose...someone please help..yes im a newbie.

Member Avatar for Narue
0
79
Member Avatar for knight81

:) good day to all... pls i have a report about a certain header file, the alloc.h, but :o i cant see any definition on the web! :?: i only want to know what is the use of <alloc.h>, & what is the advantage using it! please, i really need …

Member Avatar for knight81
0
149
Member Avatar for bhanu

hi I need a program which is to have file containing structure of employee details like deposit(transaction type) , amount and account num written in C and that file had to be sent to client 1 where it got to print the inf then at server it should contain the …

Member Avatar for bhanu
0
130
Member Avatar for Nauro

How can I make a program which will call a program and send some variables to the program and then this new program will run and then return a new set of values. In essence trying to use a program to do the same thing as a function. For example …

Member Avatar for Narue
0
81
Member Avatar for vamp

Is it possible if anyone could help me out. I asked my friend if he could do this, but pointed me here. I have no computer science knowledge/language. I was trying to get a program that hits a certain key every 4 minutes. Than another for minutes later does the …

Member Avatar for Narue
0
116
Member Avatar for scorpion82

Hi all, I would like get Windows XP transfer mode (UDMA, DMA, PIO ...etc) using C language. Is it possible? If possible, can anyone of you please teach me on that? I would like to know the detail of the message return from the function too. Thanks.

0
55
Member Avatar for niamul

/* * Please try to answer this question. There is no time bound. * The following C program segfaults of IA-64, * but works fine on IA-32. */ int main() { int* p; p = (int*)malloc(sizeof(int)); *p = 10; return 0; } >/* Why does it happen so? */ /* …

Member Avatar for niamul
0
167
Member Avatar for JimH

I need to assign a value to a variable named in a sting variable. Like this ... int temperature; int pressure; int volume; int variable_value; char Inbuffer[2048]; printf("%s","Variable List: temperature, pressure, volume"); printf ("%s","Input variable name from list above:"); gets(Inbuffer); ScanError=scanf("%s\n",variable_name); .... printf("%s","Input new value for variable:"); gets(inbuffer); ScanError=scanf("%d", variable_value); …

Member Avatar for JimH
0
194
Member Avatar for akoloff

i want to delete part of a binary file, let's say 12 byte record somewhere in the middle of the file. i can think of only one thing: - put the file pointer on the spot - shuffle all the following records up there're gotta be a better way ... …

Member Avatar for Narue
0
74
Member Avatar for saloo

3. Write a class to encrypt and decrypt a text file. The encryption step is described below: a. Find N, where N is the length of the longest line in the file, or the number of lines in the file, whichever one is higher. b. Find M, where M is …

Member Avatar for alc6379
0
69
Member Avatar for zack_rage

hi i download a compiler from borland site could you please help me with my problem when i run or compile basic programs that i have made it says a error message the stdio.h is not found so that the program has no output any good compilers that can you …

Member Avatar for murschech
0
98
Member Avatar for compeat

hi! I have a class same as below: [CODE] class sample{ friend ostream& operator<<(ostream &ostr,sample p); private: //: //: public: //: //: }; //--------------------------------------------------- ostream& operator<<(ostream &ostr,sample p){ //: //: return ostr; } [/CODE] While the compiler get to line(***) make failed with this error report: [B]type name expected![/B] ( …

Member Avatar for Narue
0
128
Member Avatar for dalaharp

Hi, i am using pow command quite frequently in my codes, and i have a feeling that i may be using it incorrectly. foe ex: [CODE]pow(image[x][y],2);[/CODE] image[x][y] is unsigned char and 2 is numeric, so is the arguments ok. [CODE]std_dev=pow(((ur_mean/(R*C))-(im_mean*im_mean)),.5);[/CODE] this a bit complicated, will it work this way? is …

Member Avatar for Narue
0
118
Member Avatar for robert_sun

I am deciding to develope a add-in or a program for outlook express which could enable outlook express to share WAB on different computers. I have checked the this website: [url]http://www.slipstick.com/outlook/share.htm[/url] But as far as I can see, All the methods it mentioned, they concern the outlook instead of outlook …

Member Avatar for BountyX
0
173
Member Avatar for robintu

I wanna turn to diverse functional entry acording to the received datas. The datas received from the serial port are at the length of 2 bytes . so I can't simply use Switch sentence. How can I make it?

Member Avatar for robintu
0
191
Member Avatar for lizp

I have written the following program, but still have a problem understanding the code . why won't this work? [code] /*This program will organize a linked list of employees Written by Elizabeth Preuss January 2005 Adapted from classwork and handouts Version 2.0 language c(target borland) */ #include <stdio.h> #include <string.h> …

Member Avatar for Narue
0
130
Member Avatar for nico

hey everyone am trying to generate a beeping sound on my pc using the 'sound' function , the problem is i am getting errors (5 to be exact ) when i compile this program , please someone point out the error on this code , thanx :) below is the …

Member Avatar for vegaseat
0
185
Member Avatar for Transworld

It would probably be easier if you took a look at this thread I made in another forum. I am Siege-Tank. [url]http://www.bwhacks.com/forums/showthread.php?t=1984[/url]

Member Avatar for alc6379
0
103
Member Avatar for galmca

[code] #include <stdio.h> #define SIZE 10 int main() { int a[ SIZE ]; int i,n,pass,hold; printf("enter the number of elements in an array:"); scanf("%d",&n); printf( "Data items in original order\n" ); for ( i = 0; i <= SIZE - 1; i++ ) printf( "%4d", a[ i ] ); for …

Member Avatar for Asif_NSU
0
1K
Member Avatar for wardduncan

Hey guys, I need some help with looping. I am writing a currency converter (who in begining programming isn't these days) and I want to have it loop so that I can it keep asking for another entry or make it quit. Here is what I have so far: [code] …

Member Avatar for wardduncan
0
158
Member Avatar for galmca

hi i am right now new to c language..and i have been facing problem in 1 array problem where i have to insert an element in to an array...i would like ur help plzz..i have tried everything but i m not able to make out from where i should start …

Member Avatar for Narue
0
118
Member Avatar for galmca

hi i am right now new to c language..and i have been facing problem in 1 array problem where i have to insert an element in to an array...i would like ur help plzz..i have tried everything but i m not able to make out from where i should start …

Member Avatar for 1o0oBhP
0
445
Member Avatar for {{unknown}}

HI I JUST START TO LREAN ABOUT C LANGAUAE AND I DONE SOME PROGRAME BY C LANGAUE.... I WOULD LIKE TO KNOW ABOUT fflush WHAT IS THIS FUNCTION STAND FOR? AND WHEN WE USE IT?

Member Avatar for {{unknown}}
0
128
Member Avatar for EyeNeedHelp
Member Avatar for murschech

I've seen a number of listings which include some pre-proccessor stuff that I don't see the need for. Here's an example. The file is a header file ADD.H. Here is the whole file: ___________________________________________________________________ #ifndef ADD_H #define ADD_H (Some function prototype which is just what you'd expect in a header …

Member Avatar for Dave Sinkula
0
107
Member Avatar for the b

Does anyone know what's wrong with this function? The program that uses it runs but does not display the average. I also tried using the sum variable instead of ptr3 and had the same results. [CODE]void calculate(int days) { float sum = 0; float average; temperature_node *ptr2; temperature_node *ptr3; ptr2 …

Member Avatar for the b
0
226
Member Avatar for chound
Member Avatar for sinB

I am trying to create a pure virtual function returning an array of pointers, without success! :cry: I would appreciate help greatly.

Member Avatar for harshchandra
0
73
Member Avatar for helloworld

Each job had: • a name ( up to 8 letters) • a unique job number ( first job 1, second 2 and so on) • a priority 1-5 • memory requirement ( multiples of 4K, max 16K ) • programmer - name, extension prog1 Your job is to create …

Member Avatar for alc6379
0
106

The End.