15,553 Topics

Member Avatar for
Member Avatar for affiliate7

Greetings, And an advanced "thank you very much" if you can help me :) I just played with the great tutorial from Dave Sinkula [url]http://www.daniweb.com/code/snippet151.html[/url] but I'm having trouble altering it. I want it to read the file, and each one of the lines, and output something like this: [QUOTE] …

Member Avatar for WaltP
0
116
Member Avatar for aznballerlee

My task is this, and I'm having trouble finishing up the code: [LIST=1] [*][QUOTE] Write a function named deleteS that accepts one character pointer as a parameter and returns no value. The parameter is a C string. This function must remove all of the upper and lower case 's' letters …

Member Avatar for Dani
0
670
Member Avatar for toomuchfreetime

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 …

Member Avatar for Salem
0
119
Member Avatar for Mr.UNOwen

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 …

Member Avatar for WaltP
0
83
Member Avatar for aburamadan
Member Avatar for iamthwee
0
49
Member Avatar for kobi

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

Member Avatar for ~s.o.s~
0
187
Member Avatar for limergal

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 …

Member Avatar for Nick Evan
0
677
Member Avatar for csc Mindy

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 …

Member Avatar for csc Mindy
0
94
Member Avatar for Sanchez10

Anyone here that can help me write a multithread program to generate 3 different Fibonnaci sequences?

Member Avatar for iamthwee
0
100
Member Avatar for noople

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 …

Member Avatar for noople
0
2K
Member Avatar for Goldfish691

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 …

Member Avatar for Goldfish691
0
156
Member Avatar for bencwai

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?

Member Avatar for Ancient Dragon
0
77
Member Avatar for belhifet

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 …

Member Avatar for Salem
0
273
Member Avatar for gabriel_wadley

[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); …

Member Avatar for Nick Evan
0
82
Member Avatar for sofianos
Member Avatar for MasterBlast

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] …

Member Avatar for MasterBlast
0
82
Member Avatar for nirmala.s

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 …

Member Avatar for John A
0
371
Member Avatar for bala24

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

Member Avatar for ~s.o.s~
0
99
Member Avatar for Francis Waldron

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 …

Member Avatar for WaltP
0
112
Member Avatar for jam7cacci

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 …

Member Avatar for jam7cacci
0
239
Member Avatar for pratigya

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??

Member Avatar for Salem
0
295
Member Avatar for davvid

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 ,,

Member Avatar for davvid
0
80
Member Avatar for sgriffiths

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 …

Member Avatar for Salem
0
1K
Member Avatar for JRM

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 …

Member Avatar for Salem
0
136
Member Avatar for whitemoss

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 …

Member Avatar for whitemoss
0
1K
Member Avatar for NSta

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 …

Member Avatar for NSta
0
128
Member Avatar for d1e9v85

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 …

Member Avatar for ~s.o.s~
0
201
Member Avatar for Monsignor

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 …

Member Avatar for the_count
0
175
Member Avatar for Firestone

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() { …

Member Avatar for ~s.o.s~
0
92
Member Avatar for yashamaru2006

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,

Member Avatar for yashamaru2006
0
83

The End.