19,876 Topics

Member Avatar for
Member Avatar for cthoes

[QUOTE]when i tried to copy structure array of name into another string array i get this error message warning: passing argument 1 of 'strcpy' makes pointer from integer without a cast [/QUOTE] [CODE] /* copying structure array name into another string array*/ #include<stdio.h> #include<string.h> int main(){ int i=0; int j,k,l,m; …

Member Avatar for stranger510
0
128
Member Avatar for ShortYute

`I am trying to limit the amount of characters that a user can enter for the address(/ in the input buffer): for example (if maximum allowed input was 30 then ): ->4 Mary drive lane, Mt. Pyle, A<- when the user typed that I am trying to get the curser …

Member Avatar for ShortYute
0
358
Member Avatar for the bird

I have a question can you help me?? In this assignment you are going to design and implement a Dictionary system that enables the user to efficiently add, remove, and search for words using a menu-driven system. The words will be organized as shown in figure 1 below. As you …

Member Avatar for Ancient Dragon
-3
96
Member Avatar for shishio1014

i would like to ask for help regarding my problem, it's like this... I have a txt file and inside it looks like this OL001 bob red 13 OL002 jack blue 13 OL003 paul yellow 14 so if my program starts it will ask for the OLXXX and return each …

Member Avatar for jonsca
0
137
Member Avatar for cthoes

[QUOTE][QUOTE] even after passing all name to bubble sort i get result of unsorted nams..so please help me in this issue [/QUOTE][/QUOTE] [CODE] /* enter customer detail in structure and put its name in asscending order*/ #include<stdio.h> #include<string.h> int main(){ int i=0; int j,k,l,m; int choice=1; char temp[10]; char words[20]; …

Member Avatar for jonsca
0
148
Member Avatar for monkey_king

Hi, Can someone elaborate why the following (the if conditional) differs [CODE=c] int main(){ const char *filename = "test.txt"; int ifd; if((ifd=open(filename,O_RDONLY))<3) err(EX_NOINPUT, "%s", filename); fprintf(stderr,"ifd is:%d\n",ifd); off_t bytes_in = lseek(ifd, (off_t)(-4), SEEK_END); return 0; } [/CODE] vs [CODE=c] int main(){ const char *filename = "test.txt"; int ifd; if(ifd=open(filename,O_RDONLY)<3) err(EX_NOINPUT, …

Member Avatar for monkey_king
0
126
Member Avatar for shianggu

The program is to output the total amount for cinema ticket of different category. I compile it with no error but the window disappears when i enter number of ticket. Can someone help me check what's wrong with my code or formula? Totally idea with it :( [code]/*Cinema Ticket Ordering …

Member Avatar for jonsca
-2
92
Member Avatar for pink24_ann07
Member Avatar for jonsca
-4
122
Member Avatar for monkey_king

I've been programmin on and off for some time. But today I saw something I hadnt seen before Some thing like [CODE=c] void error OF((const char *msg)); void gz_compress OF((FILE *in, gzFile out)); #ifdef USE_MMAP int gz_compress_mmap OF((FILE *in, gzFile out)); #endif void gz_uncompress OF((gzFile in, FILE *out)); void file_compress …

Member Avatar for jonsca
0
137
Member Avatar for kizzer

can you please do me a c++ program that convert bi to dec and so on

Member Avatar for Ancient Dragon
-6
92
Member Avatar for CrazyProgrammer

Hi, Could somebody please show me and example of how to iterate through an n-nary tree, where I do not know what n is and n could be different for every node ie the root node could have 3 children and each child might only have 2 children etc, I …

Member Avatar for john.double
0
224
Member Avatar for matthewl

Lets say I have two functions that I want to run simultaneously for different purposes as example a function handles an XML RPC requests and the other function handles an IRC connection to an IRCD. what my goal would be to avoid program hang ups on user requests. Is pthreads …

Member Avatar for gerard4143
0
112
Member Avatar for nigelmercier

Hi guys, I'm pretty much a C newbie, but I've dabbled in other languages over the years. For my current project I'm using mikroElektronica Pro C on a PIC microcontroller. I've got a 2-dimensional array defined like this: [CODE]const char FONTTABLE[96][5]= { {0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x5f,0x00,0x00}, {0x00,0x07,0x00,0x07,0x00}, /** [90 rows snipped] **/ …

Member Avatar for gerard4143
0
143
Member Avatar for kde

How can I do it - with pointer and only one loop ? for exmpl function - unsigned int dif(const char *str) [CODE] counter = 0; for(i = 0; i < N; i++) A[i] = 0; do { A[tmp % 10]++; tmp /= 10; } while(tmp); for(i = 0; i …

Member Avatar for gerard4143
0
104
Member Avatar for Jibran_

Hi! I am a student doing bachelors in Computer Science & IT. (2nd year) Please, can you people give me some decent ideas for my software project this year in C++? Last year, I built a small typing tutor (6800 lines of code) in C. I want to do something …

Member Avatar for Jibran_
-1
169
Member Avatar for cthoes

[below structure contains s1[i].name contain array of string name. to check if user entered name in that array list. i need to compare words by words. but my problem is that since string is stored in array. and string itself is an small array. so i dont know how can …

Member Avatar for cthoes
0
164
Member Avatar for er.imran2006

Want to merge multiple text file items into a single text Please give code Thanks in advance Imran Ahmed <EMAIL SNIPPED>

Member Avatar for peter_budo
0
104
Member Avatar for Pamilerin

Please I have a little problem with my project. It goes "A polynomial of degree n is represented as Pn(x)=A0 + a1x + a2x^2 + … + anx^n Where a0, a1, a2, a3 , … , an are constant coefficients. Evaluation of such polynomials may be important if Pn(x) is …

Member Avatar for vinodxx
0
111
Member Avatar for kde

how can i do it with one loop? [code] void printMat(const int mat[][N], int n) { int i, j; for(i = 0; i < n; i++) { for(j = 0; j < N; j++) printf("%3d ", mat[i][j]); puts(""); } }[/code]

Member Avatar for jonsca
0
102
Member Avatar for xouy

Hello, I'm quite new to C programming, the code below tries to print the last 10 lines of a file, My problem is in the last part of the function tail_file() : strcat(tail, character); i'm reading the file character by character, but i want to return a string containing all …

0
53
Member Avatar for shadwickman

Hello! I have a question in regards to [I]malloc[/I]/[I]calloc[/I] and [I]free[/I] in C. What I'm unsure about is the "depth" (for lack of a better word) that [I]free[/I] operates to. I know that sounds strange so let this example hopefully explain what I mean: [code=c] #include <stdlib.h> int main () …

Member Avatar for shadwickman
0
126
Member Avatar for sakina azhra

......................... please helpe me : i can't write a program ??????? consider the following list of countiers and capital : Canada Ottawa England London India New delhi Italy Roma Japan Tokyo Mexcico Mexico city Chaina Beijing United state washington Russia Moscow Germany Brlin write c programming that will accept the …

Member Avatar for Dany_08
-4
87
Member Avatar for coolcool

hi, am doing a project which needs speech recognition..my guide wants me to do it either c or c++ on my own..a basic recognition is even if english alphabets are recognised is enough..but i dunno how to start and where to start..first of all is t feasible..pls anyone help me..if …

Member Avatar for temp1234567
0
42
Member Avatar for Iam3R

Hi , I want to write a program on Lexical Analyzer: which finds the no of keywords, no of operators ( based on the classification arithmetic, logical,....), constants, and others. please suggest me one good method. i am using a method which follows as below: char *Arith_Oper[]={ "+", "-", "*", …

Member Avatar for Iam3R
0
112
Member Avatar for anthonytan

[url]http://www.daniweb.com/code/snippet216679.html[/url] This code is read an integer from user. is there any way, tt i can using char datatype variable to accept text only. text maximum is 30letter include string/spare. It also will do a check on the char array whether is text only. i've google around but no answer. …

Member Avatar for WaltP
0
70
Member Avatar for MAV_DevWantaB

Cant seem to figure this one out,,,, although I have been trying for several hours and cant seem to find any good examples on the [url]WWW..[/url]. I am attempting to write a program that prints the command-line arguments of a program... I did find a example that gives the Name …

Member Avatar for WaltP
0
135
Member Avatar for Iam3R

how the sizeof array is the total number of elements multiped by its base data type size, when the name of the array gives only the base address. [ICODE] int array [5]; sizeof array ; [/ICODE] gives 20 bytes. why not 4 bytes. because [ICODE] array = &array[0] .[/ICODE]

Member Avatar for Narue
0
104
Member Avatar for vinodxx

Hello friends, I have a code snippet related to pointer increment and decrement. [CODE]int arr[] = {1,2,3,4,5}; int *ptr; ptr = arr + 2; printf("%d %d %d %d %d %d\n",ptr,(ptr+1),ptr--,ptr,ptr++,++ptr);[/CODE] It is giving console output as: [B]1245020 1245024 1245024 1245020 1245020 1245020[/B] I am a bit surprised with the third …

Member Avatar for vinodxx
0
126
Member Avatar for Dave Sinkula

This is a [inlinecode]strtol[/inlinecode] version of [url=http://www.daniweb.com/code/snippet353.html] Read an Integer from the User, Part 2[/url].

Member Avatar for anthonytan
0
551
Member Avatar for adityap15

Hi, How can i use code of C with graphics of visual studio. The graphic should be of visual studio and i can write codes in C. How to do? Kindly help me.

Member Avatar for Ancient Dragon
0
75
Member Avatar for Pamilerin

Please I have a little problem with my project. It goes "A polynomial of degree n is represented as Pn(x)=A0 + a1x + a2x2 + … + anxn Where a0, a1, a2, a3 , … , an are constant coefficients. Evaluation of suc polynomials may be important if Pn(x) is …

Member Avatar for nezachem
0
100
Member Avatar for spitfire

I am getting errors when trying to compile my program, can anyone help? Errors are error C2143: syntax error : missing ')' before 'constant' error C2143: syntax error : missing ';' before 'constant' fatal error C1004: unexpected end of file found Here is my code: [code] // declaration of a …

Member Avatar for wish_C
0
593
Member Avatar for cthoes

i tried to pass one number by one within given range from for loop to while loop to check for armstrong. but the value passed from for loop into while loop is not accepting. so any suggestion [CODE] /*program to find armstrong within a given range */ #include<stdio.h> #include<math.h> int …

Member Avatar for n.s.hemalatha
0
115
Member Avatar for rigidboss

Hi, I wanna generate a software, which should read a C file and check for some rules. I mean, some lines will be syntactically correct according to C compiler. But logically sm lines will be wrong. I wanna detect such lines using this software. Please help me how to start …

Member Avatar for rigidboss
0
145
Member Avatar for TheWhite

I'm still fairly new to C, so I was wondering what would be the fastest way to get a char pointer pointing and ending between 2 different char delimiters? For example: text text (text I need) I need a char * to "text I need"

Member Avatar for William Hemsworth
0
104
Member Avatar for yushuan718

Hello, This is my first post here. I had learned c/c++ for about half a year, and hope now to move into win32 non-console programming. I use VC 6.0 as my IDE and had successfully created a simple "Hello World" project (built by VC 6.0) However, I do not know …

Member Avatar for yushuan718
0
94
Member Avatar for omoz4real

Hi everyone, please i created a[COLOR=#000000] C# windows application to implement a form with a ListBox, a TextBox, an Edit button, an Insert button, a Delete button, a Update button and an Exit button in the form. I want my C# program to be able to copy the columns of …

Member Avatar for youtubeline
0
160
Member Avatar for Graphix

Hi, I am currently learning C#, but when I made a program that allows the user to guess a word (in Dutch that's called "Galgje") it repeats the while-statement twice, ignoring the scanf(). I searched with Google and found out that the program is too fast for the user input. …

Member Avatar for Graphix
0
234
Member Avatar for uzair ahmad

Hello: I have an assignment of making game of life in language "C". My problem is: "The game of Life takes place on a 2d array of cells, each of which may contain an organism. Let occ(i) be the no. of cells adjacent to cell i that are occupied by …

Member Avatar for WaltP
-6
163
Member Avatar for johndoe444

Hi, What is the significance of the following format specifiers: [CODE]%10s %.10s %-10s %.15s %-15s %15.10s %-15.10s[/CODE] Thanks.

Member Avatar for WaltP
0
161
Member Avatar for asm2hex

Hello, So lately, I've been coming across this issue of mine and can't seem to find a solid way around this problem. My problem is due to the fact I'm using MYSQL C connector library. And, Attempting to gain all the Row's from my database and store them in a …

Member Avatar for Murtan
0
128
Member Avatar for Karthika_g

Can anyone help me in sorting the contents of a .txt file? Sample.txt 1562 Anu 42 1524 Ram 35 1578 Madhu 26 I want to sort into 1524 Ram 35 1562 Anu 42 1578 Madhu 26

Member Avatar for Murtan
0
58
Member Avatar for Karthika_g

Hi, I want to display a particular row of a text file and delete a particular row using C by having account no. as reference.. Can anyone help me in this. Sample.Txt: 1234567890 James 24 50000 1234567891 Allen 32 46500 1234567892 Robert 41 13600 1234567893 Smith 29 49000 Thanks in …

Member Avatar for Karthika_g
0
140
Member Avatar for michelle1

Hello there, Is there a library in C which provides a way to defines planes, lines and points as well as vectors. And is also then able to find the intersections of these? I'm not familiar with C at all and am not too sure where to begin searching for …

Member Avatar for michelle1
0
90
Member Avatar for bharath12345
Member Avatar for neha_38

HELLO! I AM IN NEED FOR [B]MCTS 3.5 FRAMEWORK(C#) 70-536 EXAM [/B][COLOR="Green"]DUMPS[/COLOR]. PLEASE CAN ANYONE PROVIDE ME THE LATEST DUMPS OF 70-536 WHICH ARE FREE TO DOWNLOAD. OR IF ANYONE HAS IT WITH THEM PLEASE MAIL THEM TO ME AT [I]<<snip>>[/I] THANKS IN ADVANCE.

-3
55
Member Avatar for ROTC89

ok so i am trying to put a menu function on the server side of a server client talk program. i would like to know if i am doing this correctly. i am also receiving a error that displays this... [code=c] serve.c: In function âstr_echoâ: serve.c:48: error: âairlineâ undeclared (first …

Member Avatar for ROTC89
0
366
Member Avatar for vivek_295

I want to create a DBMS application using c. For this purpose i need to know how to store data in different databases i.e. SQL, Oracle or MS Access. It is ok if the data can be stored in the form of files but then the security of that files …

Member Avatar for Ancient Dragon
0
125
Member Avatar for johndoe444

Hi, I want to do this. Suppose I have a source file abc.c: [B][U]abc.c[/U][/B] [CODE]int a[/CODE] another source file test-lib.c which leverage a from abc.c [B][U]test-lib.c[/U][/B][CODE] #include "abc.c" extern int a; int main() { return 0; }[/CODE] Now suppose abc.c is only available as abc.o (source code not available). And …

Member Avatar for nezachem
0
110
Member Avatar for malaks123

help me to create a program determine if the input word is anagram or not anagram of if the words are the same they are identical.......here's my code can you fix it...................plss... [CODE] # include <stdio.h> # include <conio.h> # include <string.h> int main(){ int menu,i,j,ctr=0; char fw[20],sw[20],let; do {clrscr(); …

Member Avatar for TotoTitus
0
132

The End.