15,551 Topics

Member Avatar for
Member Avatar for anisa

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!!!

Member Avatar for jwenting
0
90
Member Avatar for YoTaMiX

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 …

Member Avatar for Narue
0
108
Member Avatar for wigster84

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 …

Member Avatar for Narue
0
331
Member Avatar for aripaka

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 …

Member Avatar for calcop
0
163
Member Avatar for YoTaMiX

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 …

Member Avatar for YoTaMiX
0
1K
Member Avatar for matika

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 …

Member Avatar for iamthwee
0
156
Member Avatar for atrusmre

Is there a way to make a MFC application have Network capibilities without using windows sockets? If so, anyone know of a good tutorial?

Member Avatar for calcop
0
146
Member Avatar for drock9975

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 …

Member Avatar for Ancient Dragon
0
130
Member Avatar for server_crash

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?

Member Avatar for server_crash
0
247
Member Avatar for zenoen

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, …

Member Avatar for zenoen
0
167
Member Avatar for wigster84

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 …

Member Avatar for Lerner
0
109
Member Avatar for trinath

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 …

Member Avatar for jim mcnamara
0
119
Member Avatar for zenoen

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 …

Member Avatar for zenoen
0
301
Member Avatar for DotNetUser
Member Avatar for masa

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:

Member Avatar for masa
0
94
Member Avatar for Aldin

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) { …

Member Avatar for Narue
0
122
Member Avatar for masa

hi if you use [code] rewind( FILE *in); [/code] what you can use for [code] I/O stream library ifstream in(ff.txt); [/code]

Member Avatar for masa
0
127
Member Avatar for plus

hey, newbie here.. how do i store a string which is taken from integer :?:

Member Avatar for winbatch
0
54
Member Avatar for masa

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 …

Member Avatar for masa
0
197
Member Avatar for Ahzraei

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 …

Member Avatar for Ancient Dragon
0
258
Member Avatar for Aldin

[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: …

Member Avatar for masa
0
458
Member Avatar for iamlearning

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

Member Avatar for Rashakil Fol
0
185
Member Avatar for TimC

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 …

Member Avatar for TimC
0
179
Member Avatar for zenoen

[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 …

Member Avatar for winbatch
0
128
Member Avatar for bops

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 …

Member Avatar for Ancient Dragon
0
535
Member Avatar for vitoto

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.

0
101
Member Avatar for hanuma4

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?

Member Avatar for Dave Sinkula
0
140
Member Avatar for thehakan

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?

Member Avatar for thehakan
0
103
Member Avatar for taha umar

[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

Member Avatar for Ancient Dragon
0
67
Member Avatar for Benfried

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 …

Member Avatar for SpS
0
140

The End.