15,552 Topics
| |
To do shapes in the form I use a vector that stores a struct with the x, y, color and shape values of every shape I put on the form. I have to save and open these values. To save and open files with shapes. I use a TOpenDialog and … | |
Hey, I have here a piece of code that works in parts but does not work together. If I test all three parts at once, I get a segmentation fault immediately before the program is supposed to test for a (null) value in the string array. However, if I comment … | |
this the full code, which works like a charm, except for the error when i close the program. (a normal 'send report' / 'do not send report' error). I've narrowed it down to one line (a variabele being read from a file -> posted in red), but can't seem to … | |
I've to do a shool project where i have to write a messager in C with a friend of mine. We have to split our programm in to pieces <- Teacher said that. I do the GUI and he sends and revieves the XML-Formated messages. Now here is the Problem: … | |
The code below works for the first question (first half of the code), the program then proceeds to the second questin, but it never stops to await the answer. I can't seem to figure out what I'm doing wrong? Thx [code] #include <stdio.h> using namespace std; char answer; int main(int … | |
I have a question: I create a file named "number.inp". This file has a row of numbers: 5 4 4 3 3 3 2 note: 5 is the first number, haven't any space or char in front of 5 [CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> main() {clrscr(); int ch,v[10],count=0,i=0,j=1,n=0,a[10]; FILE *f; f=fopen("number.inp","r"); … | |
Hello, I need to create an Window Application which monitors the DVD-Player / DVD-ROM. I need my application to be able see if someone gets the DVD device running and also can see if they chose to Play - Stop - Pause - FF and the rest of functions available … | |
Hello all. I have been trying to run a program on my VC8 compiler which incorporates the Allegro enviroment. It enables users to move a small robot.bmp image around the screen by using the arrow keys. Problem is I get my main window up and first animation frame displayed, but … | |
Hi all! I have some biginner question: I've started to learn C from the Kernighan&Ritchie book, using Pelles C compiler. Why this code (from the book) dont work: [code=c] #include <stdio.h> /* count characters in input; 1st version */ main() { long nc; nc = 0; while (getchar() != EOF) … | |
im writing a program that opens a file, reads until it arrives at a colon, then jumps over the colon and reads the number after the colon the txt file contains pi:3.14159 feetPerMile:5280 0FinDegreesC:-17.8 Count these words:3 Space before number: 2.0 What about comments: 6.024e23 so i want to skip … | |
I have seen that writing anything after the completion of any pre-processor compiler directive does not affect either compilation or running of the program. i.e. #include<conio.h> 123as!#@ #define M 100 *&^asdf is perfectly valid. How can such athing happen ? | |
[CODE]#include<stdio.h> void myalloc(int **b) { *b=malloc(sizeof(int)); **b=10; printf("**b=%d\n",**b); } main() { int *a; myalloc(&a);// is this convention is correct? printf("*a=%d\n",*a); }[/CODE] i have not initialised *a. can i pass the &a(address of a pointer) without initialising it. Please look at my small program and help me out. is it a … | |
I need someone help me and share a programe 2 me.Help me... ok... Peace..:sad: thanks for your idea... | |
Hi! Here's my code: [code] for(i=0;i<N;i++) { for(j=0;j<M;j++) printf("%4.2f ",mat[i][j]); printf("\n"); } [/code] I want it to look like this: 68.85 52.25 32.00 -100.00 -632.25 -26.56 Instead I get: 68.85 52.25 32.00 -100.00 -632.25 -2.56 For life of me I can't remember how to get th alignment right. Anyone? Thanks | |
Hi All, Im currently try to write a code to read the data from mysql tables and then write the contents into a text file. Below is my code. I dunt know what's wrong with this code because in the text file created, there is no data from database written. … | |
I want to create the effect of a moving square. I would have to clear the previous position of the square and then draw a new one, right? And if that's tru how do I clear just that portion of the screen leaving the rest of my screen in tact? … | |
Hi, i would like to know if there r any native functions in C with which i can detect a keypress ( independent of the platform ). The same ofr mouse functions as well.. Any function to detect a mouse click? If not, how to detect a key press... ? … | |
Hi , I want to create a dll using the cpp file. I have followed some steps which I got from the some forums and tried to create a dll and it throws the following errors. [code] ********************************************************** islicenseviewed.cpp(19) : error C2146: syntax error : missing ';' before identifier 'CALLBACK' … | |
Hi. My name's Brianne and I just now started this semester taking Programming, Logic and Design. I have a homework problem, and what blows is this class is online, so I have to read the book, and write 100 times to get something down ... and I just don't get … | |
Is there an output function in C that keeps the cursor ON the last char printed and NOT after it? (Aside from using gotoxy(wherex()-1,y)) Thanks Ami | |
Does anybody here know how can i manage global data in multifile C programs ? Plz do reply. | |
Respected Viewers, I have to implement Network File System (NFS) . Could any of You Guide how to do that. I have to create my own shell having server as well as client performing some function like mkdir(), open(), create(), read().... etc regards | |
hai everybody, know only i start learning c program,while compiling any program i have the error "[B]stdio.h was not included"[/B] even any header file it may math.h,conio.hstdlib.h etc,we include in our program it show this error [B]"you header file is not included"[/B] [B]how will i rectify the error.[/B] [B]Thanks in … | |
Hmm,first sorry for some grammar mistakes... I have a big problem with graphics in C... For 2 days i'm looking on internet and nothing...I saw some theards and posts but none of the lib didn't work...(It was forums on my language ) I'm working in VS 6.0 I saw here … | |
If you have to count numbers of 1 in a 32 bit word. Other than checking every other bit or dividing the bits is 4 parts and then using lookup table. What will be some other most efficent way ? | |
i've been trying to use fscanf to parse parts of a line from a file. The format of each line is like the following: Connecticut,1788,Hartford,29 I've been trying to use this: [CODE]fscanf( fpIn, "%[^,], %d% [^,], %d", name, &year, cap, &popRank )[/CODE] To extract the state, year, capital, and population … | |
Hi Guys, I wonder if someone can help me out with this. I'm running the same C code in diffferent platforms (windows/unix) but getting different result. For instance the code is: [code=cplusplus] fgets(line,LINE_BUF,fp); while (!feof(fp)) { Len=strlen(line) - 1; if ( (newNode=malloc(sizeof(ListNode))) == NULL) { fprintf(stderr,"\nListInsert: Memory Allocation failed! Aborting.\n"); … | |
/*****in the book ive read, they gave me a code which will be placed in the .rss file as shown below...*****/ RESOURCE LISTBOX r_demo_listbox { flags = EAknListBoxSelectionList; array_id = r_demo_listbox_items; } RESOURCE ARRAY r_demo_listbox_items { items = { LBUF { txt = "Item1"; }, LBUF { txt = "Item2"; … | |
The End.