15,552 Topics
| |
My program uses a buffer to store data as entered by the user, so that the size of the buffer depends on them. The first thing that came to mind is that I would reallocate memory each time more storage is needed, but that doesn't seem reasonable as the data … | |
Hello, Here is my problem: I declare the vector struct in my .h file and then try to access its fields in the .c file. I did declare a variable of type vector. However, I get a compiler error saying that 'vector has no member named' [x] where x is … | |
HI, I want to sort the elements of an array in ascending order. The elements are in floating point. how do i go about doing this? Thanks for your help. Nishant | |
Hi guys, By any chance do any of you guys know any way to implement an array of linked list without using vector, since i need to implement an array of linked list using c and unfortunately vector library is unavailable. This is what i did: [code] Struct MyList{ int … | |
Hello, I just need help converting this baby in plain old vanilla C. You can tell me the equivalents of C to C++ or whatever is more convenient for you. I'm compiling in MS Visual Studio C++ 2008 and it gives me mostly "undeclared identifiers" and "syntax errors". Thanks in … | |
Could anyone explain me, how these two [B]*(ptr + i) = i; and *(ptr + (i - 1);[/B] process to get the result ? I don't understand that syntax, could anyone tell me in clearer way? [CODE=c] #include <stdio.h> #include <stdlib.h> int main() { int i; int *ptr; int number; … | |
H! Could any one please tell me with some proper explanation for: [B]Where dose Global, Static, Local, Register variables stored in memory?[/B] | |
where can i find tutorial on how to store data from turbo c to excell ? mars key, to mars and beyond | |
How can I change a character of a string within an array of strings? An execution error happens if I run the code below.. [code=c] int main(int argc, char *argv[]) { char *d[] = {"aaaa","bbbb","cccc"}; cout << d[2] << endl; //PRINT cccc d[2][2] = 'x'; cout << d[2] << endl; … | |
Hi, For last one week I have been trying to do conversions between UTF8, Multibyte, Wide Character and Ascii... Finally managed to code a working program... Thought this might help some one, so posting it here... If there are any errors, please point out... If you have any doubts please … | |
I have been programming in C for many years, but I have just started using GCC/Eclipse for a new project to develop a product using an embedded ARM processor. I have found a problem that hasn't existed in previous C compilers I have used: I have created a define as … | |
An encoded file will be decoded by the program using a key input from the user. This key is a sequence of numbers that will scramble the message in the file into its appropriate order. I have to use linked lists for this. I already started it, but I can't … | |
can somebody help me this code cannot run. I can't find the error... [code=c] #include <stdio.h> #include <conio.h> #include <ctype.h> #include<stdlib.h> //use for fflush and exit(0) #include<string.h> //use for strcpy void calculate(); void insert(); void exit(); #define TRUE 1 void calculate_and_sort(int end_of_file); int input1; char ch; typedef struct{ int num; … | |
can someone help how to develop a chat program in c. the program must run in the linux terminal and have a layout like yahoo messenger. it must have a area in which the user's can be seen, text area and an area in which one could the on going … | |
hello, I know linux has this mechanism I wanna implement it in windows 2003 and I've done some parts but one point: writer must wait until all the reader finished. hint: I don't want a loop in the mutex critical-section to subtract the semaphore by plural number,which can't be directly … | |
Hi Could anybody help me to clear that out. Just go step by step and try to explain it to me. I would appreciate it Thanks [attach]7727[/attach] The answer for that one: At the end: c1 -- 40 (hex) and c2 -- DC (hex) [attach]7726[/attach] The answer for that one: … | |
Hey guys, I was wondering if realloc() copied the contents of the block of memory to the new block "on most compilers" IF the new size is bigger. I like to learn good ways to program something, but don't want to reinvent realloc just because it doesn't work on <reallyoldcompiler>. … | |
i guys Using socket programing i am trying to write a proxy server. when i start to read headers that has been sent from the browser it will initially dispaly some headers and after that it goes blank. simply becomes idle .. it does not return the controle to the … | |
I'm trying this tutorial using the get system metrics functions so what i did was to include the windows.h preprocessor directive although when i'm trying to compile my program i get th e error "undefined symbol '_GetSystemMetrics@4'. I'm using TCC as my compiler. | |
Hello! I am working on some code for a program that squares,sums and divides 3 numbers: [code=cplus] int num,sq,sumd; int a; int b; int c; printf ("Please enter a positive integer for a/n"); //input scanf ("%d", &a); printf ("Please enter a positive integer for b/n"); //input scanf ("%d", &b); printf … | |
Hi, I want to read .wav file from the any directory in windowsXP and draw the graph of that particular file using C or C++ code.. Can anyone help please????? | |
Hi. The following calculator will return wrong values for operations which are more complicated than <INTEGER><OPERATION><INTEGER>. I suppose I'm making a mistake in parser.y, but I can't figure out what. I know there are mistakes, memory leaks and other technical issues I'm doing wrong, but please concentrate on my biggest … | |
Hi All, I have this old c program that I did a while back on pascals triangle and i'm trying to convert it over to c#.net. Can anyone help me do this? I do not know much or anything on on c# Here is the code: [code=c] //Lyncob directory #include … | |
Hello! I'm new to C programming and I have a question. I'm trying to write a C program that that can: Open a file (the file name is unknown) located within the same directory as the executable file, search through the contents of the file for a particular keyword (for … | |
Lets say i did something like [code=cplusplus] { .... spGrades = fopen ("temp.txt","w"); fclose (spGrades) .... } [/code] where will be the temp.txt written to ? and how can we change the written location of the temp.txt ? thx in advance | |
Hi, I have one query that: Can we write [B]a function similar to printf()[/B]? If it is possible then how could it be written? | |
Hi I am working on a program that computes the sum of N in increments of 3. I do not have any errors but when you run the program it does not compute correctly for example if you enter 2 for n the sum should be 5 [code=cplusplus] #include "stdafx.h" … | |
I am working on printing a loop statement. I worked on this to try the concept: [code=cplus] #include "stdafx.h" #include "stdio.h" int main() { int times,num; for (times=1; times<3; times++) { for (num=1; num<5; num++) { printf("%d",num); } printf("\n"); } return 0; } [/code] What I need is to print … | |
Can anyone tell me why I'm getting "number 1" as my output when i enter arguments 1, 2, 3. It seems like its always 1 and I don't know why. [CODE]int main(int argc, char *argv[]) { if (argv[1] = "1"){ printf("number 1"); }else if(argv[1] = "2"){ printf("number 2"); }else if(argv[1] … | |
Hellow.......! I need a help for: How will you declare [B]an array of three function pointers[/B] where each function receives two integers and returns a float? |
The End.