15,551 Topics
| |
I just wanted to know some advices on the classes I should use to create an airline booking program. The homework I have requires that I have to take input from a file and also to output also the information to a file-that makes also another problem...I need help!!! | |
Hello to you All , For some reason , the Compiler throws me an Error "Illegal Operation" on the Comparison described below : #include <stdio.h> #include <math.h> #include <conio.h> typedef struct { double x,y; } Point; typedef struct { Point l, r; } Rectangle; typedef struct { Point Center; double … | |
Iv been working on this code and playing around with it. So far, i have a code for converting a string to integers. [CODE]#include <string.h> #include <stdio.h> char string[] = "6565,4325,7074,7897,7685,3478"; char seps[] = " ,"; char *token; void main(void) { printf( "%s\n\n Tokens:\n", string); token = strtok( string, seps … | |
Hi, Probably everybody know that sound() function in C produces sound thru the PC speaker. I want to code a program in C to play sounds thru stereo speaker. I learnt that we need to make extensive use of ports. So whats the concept of ports? I also want to … | |
Hello you all!!! I got an Assignment to sort a Randomized Dynamic 2D Matrix of Integers , Snake style : for Example : biggest number in row 0 , after it follows (beneath it , vividly) the next number : 1 2 3 4 5 10 9 8 7 6 … | |
hiiii i'm new using opengl when i was trying to do some transformation using glRotated(45,0,1); for example, it do the tranformation on all wht i've drawn on screen ex. if i was drawing a rectangle and triangle they both rotate at the same time while i want on the triangle … | |
Is there a way to make a MFC application have Network capibilities without using windows sockets? If so, anyone know of a good tutorial? | |
just a simple question that has been driving me bonkers for a few hours, but I'm new to MFC and haven't encountered this until today I've implemented serialization in my current project and set the modify flag appropriately... when I select "New" or "Exit" in my menu the program correctly … | |
I'm trying this: char info[50]; myfile.getline(info, sizeof(info) ); double my_double = atof(info); It seems to work, I think, but I'm getting an error when I try to print out the double. It says no matching function for ostream& << &double. Can anyone help me with this? | |
here is my problem main.c:17: error: parse error before '{' token main.c:27: error: parse error before string constant [CODE]#include <stdio.h> #include <c.h> #include <math.h> #include <ctype.h> #include <time.h> #include <stdlib.h> #include <string.h> #define kmll 200 #define Kzll 0 int myint,any,go; int main (int argc, const char * argv[]) { (myint, … | |
If i have a set of numbers: [B]48098, 50933, 3128, 323, 42, 5[/B]..etc how can i convert them into integers? I have an example of a code ([I]see below[/I]) that will convert one number, not the whole set. So, im having trouble trying to convert a set of numbers seperated … | |
Hi all, I have a problem in handling files through C. here is the problem im having: i will query the database (for instance consider employees table ) for empno,ename,job,salary fields.The query returns me some 100 of rows. now i need to place them in a file in row wise … | |
im learning c and need help learning this concept and what it does [code]#include <stdio.h> #include <c.h> #include <math.h> #include <time.h> #include <stdlib.h> int rollone(void); void printrolls(int rolls[]); void printx(int howMany); int main (int argc, const char * argv[]) { int rolls[ 13 ], twoDice, i; srand (clock() ); for … | |
How would I convert a String* variable to a char*variable? | |
Hi if you have a file on c drive under a particular folder how can you open it [code] ifstream input(filename); [/code] if your file name is available in c drive on myfile folder (filename=" C:\myfile\hi.txt") :idea: | |
Hi see this code [code] #define MAX_LINE_LENGTH 1024 #define MAX_TOKEN_LENGTH 32 typedef struct max_min { char maximum[MAX_TOKEN_LENGTH]; char minimum[MAX_TOKEN_LENGTH]; } m_and_m; [/Code] [code] enum data_type{enumber}; [/code] in your main program did this [code] m_and_m max_number; FILE *fp; int result; /*Open input file*/ fp = fopen("read.csv","r"); if (fp != NULL) { … | |
hi if you use [code] rewind( FILE *in); [/code] what you can use for [code] I/O stream library ifstream in(ff.txt); [/code] | |
hey, newbie here.. how do i store a string which is taken from integer :?: | |
Hi when I was looking on some thread, a question :?: comes to my mind, when you have a file like the one Log.csv from Aldin post, do you need to put it in a dynamic array to get the max and the min and the date..etc. or you can … | |
I have a base class (call it A) from which I have several derived classes. A has a CArray<A*> data member (dynamic array of pointers to A objects). When adding an object of B (class derived from A), none of B's data members show up when the object is accessed … | |
[qoute] If you have a folder called Data in your C drive, in Data folder there are day_01.txt, day_02.txt ,……………………day_30.txt . you need to build a program that called the file according to it previous date, so if the date 2/10/2005 you have to call and open file day_01.txt. Notice1: … | |
I would like to create a macro to convert a variable string into the UNICODE (16 bits). Example: [B]#define UNICODE ("xyz") [/B] - It will return 0,'x',0,'y',0, z at compilation time. The size of parameter to the macro can be any length. Thanks for helping | |
I am having a small problem removing ALL items from a linked list. I have written a function that will remove all discharged patients from the linked list. [code] [COLOR=Red] for(int a=1;a<(S.size()+1);a++) { int x=S.retrieve_status(a); if (x==5) { S.remove(a); } }[/COLOR] [/code] in this function I check to see if … | |
[code]#include <stdio.h> #include <c.h> //int main (int argc, const char * argv[]); switch (1066) { case 1066 printf( " Battle of Hastings"); break; case 1492 printf( "columbus sailed to some place" ); break; case 1776 printf( "The decleration of indipendence was written and signed") break; defult: printf( "something happend but … | |
Hi, I am trying to get the file size of a .exe file in C, I have tried using the GetFileSize(); function using the CreateFile(); function to get a handle for it, but the value returned is a DWORD and doesnt seem to work when i output it. I want … | |
Hi, some expert can help in make code for protect specify process. Maybe some HookAlert the this APIs : GetHProcExe FindWindow GetWindowProcessID OpenProcess ProtectEx WriteProcessMemory GetProcAddress When try get infor the SPECIFY PID, is posible ? Check Program AntiHook 2.5 the InfoProcess. | |
if we use short then we can save memory.But eventhough if we use short it occupies 2 bytes of memory so how can we save memort? | |
int p(int x) { if(x<3) return x; else return p(x-1) * p(x-3); } say m(x) is a number of multiplication operations that the execution of p(x) performs. what can be recursive definition of m(x)?? Answer should be (x-1)*(x-3) . Am I wrong? | |
[U][B]Problem Statement: Write a program that adds two matrices A and B of order 2X4 and store the result in third matrix C and C is stored in a file “result.txt | |
Hi everyone, I'm beginning to learn about progamming and I'm currently working through the seminal 'C Programming Language' which is excellent, but I have a problem regarding functions. My understanding of functions in C is that they return a value. For example: [code]x = func(a, b);[/code] ...would set x to … |
The End.