19,876 Topics
![]() | |
[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; … | |
`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 … | |
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 … | |
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 … | |
[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]; … | |
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, … | |
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 … | |
visual C++ conversion of decimal to binary,binary to octal,octal to hexadecimal.. | |
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 … | |
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 … | |
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 … | |
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] **/ … | |
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 … | |
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 … | |
[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 … | |
Want to merge multiple text file items into a single text Please give code Thanks in advance Imran Ahmed <EMAIL SNIPPED> | |
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 … | |
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] | |
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 … | |
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 () … | |
......................... 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 … | |
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 … | |
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[]={ "+", "-", "*", … | |
[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. … | |
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 … | |
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] | |
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 … | |
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]. | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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" | |
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 … | |
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 … | |
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. … | |
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 … | |
Hi, What is the significance of the following format specifiers: [CODE]%10s %.10s %-10s %.15s %-15s %15.10s %-15.10s[/CODE] Thanks. | |
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 … | |
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 | |
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 … | |
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 … | |
how to display ascii file as image in c(using turbo c) | |
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. | |
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 … | |
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 … | |
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 … | |
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(); … |
The End.