15,552 Topics
| |
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== … | |
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. | |
:) 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 … | |
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 … | |
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 … | |
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 … | |
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. | |
/* * 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? */ /* … | |
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); … | |
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 ... … | |
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 … | |
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 … | |
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] ( … | |
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 … | |
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 … | |
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? | |
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> … | |
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 … | |
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] | |
[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 … | |
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] … | |
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 … | |
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 … | |
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? | |
I am so lost! I just need somebody to explain what to do and how it works. | |
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 … | |
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 … | |
I am trying to create a pure virtual function returning an array of pointers, without success! :cry: I would appreciate help greatly. | |
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 … |
The End.