15,551 Topics
| |
Hey everyone new to the board and in a bit of bother. I've got this assignment thats been plaging me for two weeks but i can't do this one bit as i just don't get it. I've got to write a programme that takes data in from a file and … | |
Does anyone know what is the best function to use if you want to read user input and not have the return key carry over? Everytime I write something that reads in two things, the second read in always ends up being '\n' because the return key carries over to … | |
Hi , What does it mean this statement char*(*(*x)(void))[] Thank you. | |
Hello , i have in a director c:\files_t several files t1 t2 t3...t300 i need to analize each on-the analize operation is not importent how can i [B][U]open each file in a loop[/U][/B] and analize them?-in [U][B]C[/B][/U]code thanks ahead | |
I have a code, and this is another problem, that's not working; Given: an int variable k , an int array currentMembers that has been declared and initialized, an int variable nMembers that contains the number of elements in the array, an int variable memberID that has been initialized, and … | |
Hi Everyone, I am trying to compile code for a FAT file system implementation. I define my struct as struct DirEntry { uint8_t status PACKED; uint32_t start_block PACKED; uint32_t num_blocks PACKED; uint32_t fsize PACKED; MC_Time created PACKED; MC_Time modified PACKED; uint8_t fname[31] PACKED; uint8_t unused[6] PACKED; }; typedef struct DirEntry … | |
Anyone here that can help me write a multithread program to generate 3 different Fibonnaci sequences? | |
Hi all, I'm working in the C language. I've been stuck for 2 weeks trying to figure out how in the world to populate arrays after reading in an input FILE. the input file has numbers and words, I need to write a loop that grabs the integers and stores … | |
Hi there, I'm trying to write a simple encryption program that reads normal text from a txt file - encrypts it using a Vigenère Table - then outputs the results to another file. This process should obviously be reversible as well. I have written this for the encryption part of … | |
class Order { private: vector<OrderItem> items; public: // Constructor Order() {} // accessors OrderItem operator[](int index) const { return items[index]; } // mutators [COLOR=red]OrderItem& [/COLOR]operator[](int index) { return items[index]; } in this programme the accessors seems useless,and what is the use of the operator "&" in the mutator? | |
This is C. 1. My question is how would I read in an integer securely from stdin. I saw the following snippets: [URL]http://www.daniweb.com/code/snippet441.html[/URL] [URL]http://www.daniweb.com/code/snippet597.html[/URL] Would those functions protect from integer overflows/underflows AND format string attacks? 2. What about strings? Does a simple use of fgets protect from buffer overflows AND … | |
[code=c] #include<stdio.h> #include <conio.h> void main() { int line,c,n,x; void pasc(int); printf("\n\nInsert, how much line do you want: "); scanf("%d",&line); printf("\n\n\n"); printf("\nPascal's Triangle Is : (press enter)\n"); for(x=line-1;x>=0;x--) printf(" "); printf(" 1\n\n"); for(n=2;n<=line;n++) { for(c=line-n;c>=1;c--) printf(" "); pasc(n); printf("\n"); getche(); } } void pasc(int n) { int r; long fact(int); … | |
I will be very thankful if someone can help me out....;) | |
i am new student i had a home work but i cant get this done how can i input in the same line a char and two integers the output should be like this : please enter candidate family condition, defect percent, children number, working condition: [B]s 20 0 1[/B] … | |
My txt file is of the format: [B]Date Station Operator Task Action[/B] and a list of values under each heading.. Now how do i write a C code to pull up records tht match a specific value under "TASK"...... say for example, if [B]Task = Vendor Setup,[/B] then the result … | |
Hi, I have this application in Graphics that has to print a report on a laser printer. Is there any way to do it.... Thanks | |
Write a C program with 4 functions in main 1 int intSum(intx, int y) accept 2 ints as parameters adds the 2 # up returns the sum 2. int intdiff(intx, inty) accepts 2 # as param. subtracts them returns with diff. 3 int intProd(intx, int y) accepts 2 # muiltplies … | |
Hi! anyone who could help me fix this code for it to work? i need your help very badly. :) i'm having a hard time debugging my program for it to work... i dont know how to use the function rand() properly.. :rolleyes: tried everything i can but it just … | |
whats wrong with this code it compiles well but gives wrong results code is to arrange the 5 numbers in ascending order [code=c] for (a=0;a<=4;a++) { for (b=a+1;b<=4;b++) { if (num[a]>num[b]) { temp=num[a]; num[a]=num[b]; num[b]=temp; } } } [/code]can anyone tell whats wrong?? | |
I wana make so many lines appear randomly (like heat beat rate) depend on the base line ..while I run the program . How can i make that works . pls give me some hints or code ,, | |
Hello All i have a program written in C, and i want to call a sharedobject, which i can do fine! The only problem i am having is passing parameters.. Here is my code [code] int main() { static int (*fp)(int); int *handle; int MatchFound; struct SharedObject_{ char name[10]; char … | |
I have some old programs compiled in the aout format which I would like to recompile with ELF for Linux. I found this decompiler program (REC) which claims to be able to do the trick. Unfortunatly, the way he has the the download setup is not very good for a … | |
Hi all, I try to compile my program and got this kind of error: test6.c: In function `main': test6.c:46: too many arguments to function `mysql_query' Here is my code: [CODE] int main(int argc, char *argv[]) { char string1[1600], string2[1600], query[1600], mobileno[50]; int i, j, len; FILE *fp2; mysql_init(&conn); /* Connect … | |
Hi i am so lost and stressed please can some help me. My question is how do i code the follwoing • Constructor: Copy The copy constructor should check the validity of the Entry object parameter through the use of the isValid method and copy the valid objects media and … | |
i am having trouble iwth this question i am a little weak with classes that is why i cant complete this any help would be greatly appreciated Create a class for airline reservation. Assume that there are two aircraft models A, B. The class has following constants defined, const int … | |
I'm not sure if my title makes sense. My problem is the following: I input a string and the function in my program is supposed to change every digit (except for 0) it finds in the string to a value -1 of that digit (eg 'er345ut' should be changed to … | |
I keep looking at this code, and cant find out the problem... I made this as part of a library of math functions. It asks the user to enter the number of numbers to subtract, then enter them. It should work, but for some reason doesn't. [code] void sub() { … | |
Hi, Can anyone help me read the code below? I have an idea but i am not quite sure. [code] *(DWORD*)(pDesPtr+(nDesIndex>>3)) |= pSrc[nCount] << (nDesIndex&7); [/code] thanks a lot, | |
Hello all I want to split regular expression values in the list (in quotes) list("A","B"....... ) What is the best way to go about this? Regards | |
Hey! Writing a simple client/server in C and I'm currently stuck with getting the results after calling system("ls") so I can send it from server to client. Since system() returns an int I tried popen() --> [CODE] char buffer[1000]; FILE* myPipe = popen(buf, "r"); if(myPipe==NULL){ //errorstuff } while(fgets(buffer, 1000, myPipe)!=NULL){ … |
The End.