15,551 Topics
| |
Hi all, using C language we can read text files. we can read each and every character. ch =fgetc(filepointer); but i want to know how to read folders. for ex: fopen("c:\one foldername", "r"); in out put i want print subfolders and files. if any body know please help me... thanks … | |
hello, I have a rather old system, running Red Hat 5, and I need to write a program that, among other things, imports data from an external file(s) and writes it into array(s); the following is the format of my external data file (obviously it's much larger): [code] 2.59 3.17 … | |
This code i've written keeps showing an error "constant expression expected in function main". I'm not sure if the code i've written is on track. [code] #include<stdio.h> #include<math.h> #define MULTIPLY 1 int i,n; int operation; int Answer = 1; int main() { printf("You are welcome\n"); printf(" how many numbers do … | |
Hi, I've been trying to analyze the source code to some applications but so far I've been unable to figure out how to receive user input while the program is of doing something else. My program consists of a small list of items which are being constantly sorted. The problem … | |
why is this giving a syntax error? [code] int function ( int x) { x ? return 1 : return 0; } error C2059: syntax error : 'return' [/code] | |
Hello I have a list of data, which looks something like below www.clickajob.co.uk%2Fprofiles%2F316%2F6%2F|a/TLT10911641168.google www.ukdata.com%2Fcompany-listings%2FAd-16.html|a/TLT10911767856.google I need to parse this data so i am left with www.clickajob.co.uk|TLT10911641168.google www.ukdata.com|TLT10911767856.google Does anyone know how to help me? I have the following so far [ICODE] if ( fp == NULL ) { printf("Error opening … | |
Hi. i'm trying to copy a binary already with a predefined permissions. I got this code: [CODE] FILE *f1, *f2; char cp; f1 = fopen("file1","rb"); f2 = fopen("file2","wb"); while(!feof(f1)) { cp = fgetc(f1); if(!feof(f1)) fputc(cp, f2); fclose(f1); fclose(f2);[/CODE] but this just copy a file. But what i'm trying to do … | |
Hi I have been pulling my hair out trying to figure this out. Please help!!! Here is my project description: By using a pointer to pointers **A and **B and the function calloc() allocate the memory for the 4x4 matrices A[][] and B[][]. By using the pointers *a and *b … | |
Hi, I need to transfer data from file to fields... Can anyone help me? file: [CODE] name surname weight age male/female name surname weight age male/female marek mixa 70 23 M ... [/CODE] kód: [code] typedef struct lidi { char cl_jmeno[16], cl_prijmeni[21], cl_muz_zena[1],cl_vyska[3], cl_vaha[3]; } LIDI; LIDI lidi[6]; [/code] i … | |
i need a prog to find the num of solution possible for n queen can anyone help???? waitin 4 a reply as soon as possible...... thx... | |
Hey, When quick googling didn't really clarify, I'd like to ask here. When declaring an N-dimensional array, 2D in this case, how to set them all to zero? For 1D arrays it should work with type name[n] = {0}; Is the same approach also guaranteed to work for N-Dimensional arrays … | |
I'm trying to read two data (different types) from binary file (First I had written these data in it). I have problem with output. it's really unexpected: 0.000000000000000000000000 and 10000. Where's the problem in reading double data type? (OS: win xp; compiler tc 3.0; similar result i get with Visual … | |
parser for c language help me -------------------------------------------------------------------------------- i want parser in language i have grammer is that SS->AAaBBb AA->a|b BB->aAA this a letter for language a ,b [code=cplusplus] int lexan() { int lookahead; lookahead=getchar(); return t; } int match(int t) { if(lookahead==t) lookahead=lexan(); else error(); return lookahead; } void error() … | |
how programing a text editor by c program answer me my mail :<snipped email> | |
Good day, Generally speaking, for C programming, what can I do, if the application which I am writing requires the heap to expand and contract dynamically? | |
Hello. I got a problem of that type: for example i have a simple program like this: [CODE]int main(){ sleep(10); }[/CODE] now if i define time to be 10 sec, prog works fine. [CODE]#define TIME 10 sleep(TIME)[/CODE] but i am trying to do something like that: [CODE]char time; // or … | |
hi how r u? i have solve to find out prime number. But i can not do this problem which is: if i take a number. supose it is 40. the program will display 1-prime, 2-not prime,3-prime upto 40-prime. plz solve my problem. thnk u. bye | |
i`m trying to make a program to calculate the product of this serie: 1/2 *1/3 *5/2 *5/6 *8/10 *16/13 *23/24..... the following program gets compiled without errors but when i execute it pops up a window: prog.exe has encountered a problem..etc... can anyone help me with this problem [code=cplusplus] #include<stdio.h> … | |
I want to use cygwin compiler in DevCpp...how shall I?(I have been using cygwin to compile programs of Lnux in Windows) | |
I found a problem with how to find a maximum value with linked list... but it didn't need a parameter... | |
Help! Now I study about NAT (Network Address Translator), it is a new way about translate IP local to public. Ok, the point is when I want to install NAT in LINUX, i got error messages like below. I think this is about coding in nat.h. What should I do … | |
Teacher gave a question today to find Base is 2 and power is 3. so that Answer should be 8. so to find that she told us to use Recursion and do it. i done it in the normal way. but when i do it in the Recursion way. one … | |
Hey guys, this is a really basic question but I can't figure out how to answer it! I wrote a program for users to input product price, quantity, etc. After getting the input the program displays the quantity, price, total cost, etc., and asks if the user wants to input … | |
i know everyone hates hw help but i just need some help getting started with writing the functions. here is what i have so far: [code] /* ATM Simulator Function Source File atm.c ** ** CSC-234 (M. Hutchenreuther) John Jones ** Assignment 8 Part A Section 1 ** November 9, … | |
I want to split a string into token depending on different delimiters. e.g. char * temp = "asfs:ggd,oper:eger,ropptujnsdn:hfhgw"; and firstly I want to split data by using "," (lets call a block). and then each block should again split using ":" and save each token's value. then finally I want … | |
Hi I am wondering about the syntax to convert the value in address.sin_addr.s_addr into readable ip value (ie reverse of inet_addr?). btw I do know we can just use address.sin_addr to get the ip, but i need to use s_addr to pass ip infos between clients thanks in advance | |
I am making a game and i want to to have multi player support. What i mean is that.... When you load from the save file, you have to write the file name right? Eg. [code] FILE *out; out = fopen("datafile.dat", "r+b"); [/code] How can you let the player choose … | |
HI I am facing some (lot of, actually) problems porting a legacy program from UNIX to WINDOWS... I see a lot of errors like this error LNK2001: unresolved external symbol Can some one help how to get rid of these errors.. Thanks in advance | |
here's my code [code] #include <math.h> #define M_PI 3.14159265358979323846 // Calculate Constant double constant() { const double figure = 7.9454E-18; double number = log (figure); return -10 * number ; } [/code] The value in number should be -17.099... But i get -39.379... What's the problem here? | |
Hi, I want to know how to capture and store images using a webcam in C? I searched this many places I did not get it.If somebody knows it please tell me. |
The End.