19,876 Topics

Member Avatar for
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
110
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
335
Member Avatar for mr_god_god

(I am a beginner, please don't be mean if I make any serious mistakes.) :sad: The purpose of this program is to cout the largest and the second largest number among 10 numbers. Although I have thought for serveral times, I still don't get what is the problem. [PHP] #include<iostream> …

Member Avatar for mr_god_god
0
318
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
167
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
158
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
148
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
133
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
251
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
171
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
111
Member Avatar for pblilman09

Hello all, i am a 14 year old computer tech. I know what your thinking, yeah right some little kiddie unplugged his hard drive and plugged it back in and considers himself a tech. HA. your all wrong. i have revived a gateway that my neighbors were throwing out because …

0
65
Member Avatar for Virii

Is the book "Wiley's Teach yourself C++" a useful book or is it one of the sub-par books? Also, for a beginner is the book Object-Oriented Programming In C++ by Robert LaFore a good book to get and read?

Member Avatar for Rashakil Fol
1
201
Member Avatar for kisvirag21

I need to write a program that generates 10 problems, in which 2 randomly genorated numbers are chosen to multiply together, and the user has to input the correct answer for each program, and i have store the answers, and check to see if they are correct. I could just …

Member Avatar for iamthwee
0
153
Member Avatar for rhurst

Our client in the West Chester area doing exciting things with multimedia product development for commercial sale. Assignment will be at least 2 months and the rate available is a fair one. Good learning environment and excellent working environment. Required: - Strong development experience in C#/.net. - Experience working with …

0
48
Member Avatar for fluidDelusions

Suppose I have a class, Animal, that contains the virtual method eat(). Now suppose Dog is derived from Animal, and also implements eat(). Now somewhere else, I have a class Barn with a feed method that takes Animal& as a parameter. How can I force class Barn to call Dog's …

Member Avatar for NosKills
0
279
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
121
Member Avatar for kisvirag21

I need to write a program that inputs an integer and a character, and outputs a symetrical triangle composed of the character that has the interger of new lines. I can only use 'while' loops at this stage of the course, and I know it has to be nested 'while' …

Member Avatar for kisvirag21
0
322
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
304
Member Avatar for red

Hello, Is there a function that would allow me to check the characters when they key is pressed....before the enter key? I am coding a program that requieres the user to enter only letters (from A to Z && a to z), but I want to check each character when …

Member Avatar for red
0
151
Member Avatar for MaaleaRogers

Perhaps someone can show me how to fix the following example code so either the function outputx() or outputy() is passed to the function print_it(). void do_it(); // prototype void outputx(); // prototype void outputy(); // prototype void print_it( print_character() ); // prototype void outputx() { printf("x\n") } void outputy() …

Member Avatar for MaaleaRogers
0
411
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
97
Member Avatar for Jon182

Hey guys, I have been told that the getline function in C++ is a standard library member but is this true as the #include <stdlib> header file does not have to be included in order for getline to work? Thanks.

Member Avatar for Ancient Dragon
0
371
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
123
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
130
Member Avatar for plus

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

Member Avatar for winbatch
0
57
Member Avatar for VTMas

Here's what I'm trying to do: I have a DSN for an Oracle ODBC Connection. My code needs to attempt to read from a file first the connection string, followed by the SQL commands to be executed. All of this I have down already, except for the Database name in …

Member Avatar for VTMas
0
167
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
203
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
288
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
463
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
191
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
190
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
132
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
547
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
102
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
142
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
105
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
68
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
143
Member Avatar for Dabdob

Hi guys… I want to write small program in C printing three or more people in array..how? please write to me the syntax as I am very poor in C.. How to define the name? and accept the conformation from the user? Either by yes or no The printing should …

Member Avatar for server_crash
0
132
Member Avatar for nabil1983

Trying to understand how to do this Q. Can some explain using O-notation, how would i analyse the efficiency of the two algorithms below. ? Assuming that the critical operation is compute and size is the size of the array. 1) compute(a[1]) + compute(a[2]) + compute(a[3]) + compute(a[size]) 2) for …

Member Avatar for nabil1983
0
101
Member Avatar for SpS

I am quite familiar with C++ language...wanted to expand my knowledge...so just wanted to ask you gurus...what would be better to learn next...Managed C++ or C#...or something else more demanding in the market.

Member Avatar for iamthwee
0
76
Member Avatar for comwizz

I am having this problem with precedence of operators. Its with the increment and decrement operators. [code] int i,j=1; i=(j++)+(++j)+(j++); [/code] this evaluates to 6 instead of 7 . Why does this happen. It would be of great help to me. Thanks, comwizz

Member Avatar for Rashakil Fol
0
173
Member Avatar for TimC

what I am trying to do is retrive the "status" back to my main prog of the status of a patient. I thought it was a simple case of S.retrieve(index of person I was looking for) and I would recive the status (which is an integer) back to my main …

Member Avatar for TimC
0
88
Member Avatar for TimC

Below I have attached 4 methods from my linked list class. 1) find 2)remove 3)retrieve 4) Insert. what I'm trying to do is write code that will let me MOVE the position of a node to another position in the linked list. Anyone got a clue?? regards Tim [code]SeqItemType Sequence::retrieve(int …

Member Avatar for TimC
0
141
Member Avatar for Dabdob

Hi guys,, i want to have C to my PC..i am using win XP. anyone can help me please

Member Avatar for perniciosus
0
192
Member Avatar for ferrant

Hi, I have difficulty declaring a hash_set. I would like a hash set where the key is a structure Point3d (typedef Point3D {short x,y,z}) and the value in the set associated with the key an int. I don't quite understand how to declare it ... something like hash_set< const Point3D, …

Member Avatar for perniciosus
0
147
Member Avatar for atrusmre

So I'm writing a program (MFC) that connects to a server w/ windows sockets (YUCK I know). I left it running as part of an endurance test the other day, and my PC ran out of virtual memory. Odd eh? So I ran it again using task manager and noted …

Member Avatar for perniciosus
0
522
Member Avatar for nabil1983

Hello Im trying to understand and explain how the quick sort code actually works, i unable to understand or xplain line 4 to 11. Can ne of u xplain to me briefly what those lines actually do in the code algorithm.... Apreciate ne help. [CODE]do { while(strcmp(array[i].Genre,x)<0 && i<right) i++; …

Member Avatar for perniciosus
0
119

The End.