51,593 Topics

Member Avatar for
Member Avatar for kemarS

Hi guys Does anyone here have any C++ tutorials on how to use the "CMap" function ? I need to use a CMap but I have not the SLIGHTEST idea where to start, I just basically understand why I'm using it.... So any links to websites are welcome. If they …

Member Avatar for mitrmkar
0
109
Member Avatar for cbattagler

Hello, I am trying to send directory names through the command line to program I am writing. This works perfectly until I add a space to the directory. I have tried adding Quotes around the directories and everything. The problem is then with the \ at the end of the …

Member Avatar for cbattagler
0
94
Member Avatar for daviddoria

I wrote a simple class: c:\geometry\Point.h c:\geometry\Point.cpp I made a VS2005 project and added a Source File test.cpp which contains main(). In test.cpp, I #include "c:/geometry/Point.h" When I build the project I get: Unresolved external symbol "public: __thiscall Point::Point(double,double,double)" referenced in function _main. However, if add Point.h to my Header …

Member Avatar for daviddoria
0
114
Member Avatar for Crazycfk

someone showed me their code for their conversion program and left before I could ask question about how his program works q1:how exactly does "*" this work when not applied for mutipling? q2:does "a_base" and "b_base" work with this function unsigned long base2dec(char str[],int base) and does it have to …

Member Avatar for Crazycfk
0
110
Member Avatar for mzdiva041986

This is the program and I have 5 errors that I can't seem to get rid of, it was a Fortran 95 program that I had to translate into C++. could somone please help me. [code=cplusplus] #include <iostream> using namespace std; int main() { //Declaration and Intialization float XL = …

Member Avatar for mzdiva041986
0
104
Member Avatar for bhoot_jb

i hav coded a matrix class and its member functions (many of them are overloaded ones)...now in a function..for eg. function of matrix addition.. [B]after the addition i want to return the local object "result" through a pointer (and not call by value)..however i aint getting d values of the …

Member Avatar for bhoot_jb
0
259
Member Avatar for Ben10

[B]a. Write a pseudo-code that prompt the user to input number of sold items and then receive the sold value for each item, calculate the average value, display the items numbers associated with its values and display also the calculated average value on the screen. b. write down the C++ …

Member Avatar for Ben10
0
148
Member Avatar for Dulaithol

I'm new to c / c BUT not new to programing, I know php vary well. Well, on to my question. I'm writing a physics calc, the user enters a Vi and Angle and it gives them the rest of the info, [url=http://www.kc8onw.net/~jacob/calc.php]here's[/url] my php version. I got my c …

Member Avatar for kynt
0
486
Member Avatar for Jboy05

I need help with a conversion this to a switch statement, I haven't done one before that is why im asking [code]Convert the following C++ if statement to equavalent switch statement: if (SalesType >= 4 && SalesType <= 5) { TypeName = "Weekly Special"; DiscountRate = 0.45; } else if …

Member Avatar for Narue
0
112
Member Avatar for mod_motox

Hi I am wondering why size_t is used when it has the same functionality as an int and assigning size_t type variable to int works fine. Any one ? Thanks

Member Avatar for Narue
0
3K
Member Avatar for smelf1

Hi, I have not programmed for at least 9+ years and am looking to try to get back into it. How can i implement the encryption and decryption as used in DES. The program should ideally receive a message or open a file to encrypt it or decrypt it. it …

0
77
Member Avatar for Lalarukh khalid

hi!!!!! i just want 2 ask tht how czn i select the topice 4 project.... can somebody give me some examples..... tell me let u one thing tht i am a beginner...

Member Avatar for Narue
0
85
Member Avatar for w2s

(The program below should calculate sine of an angle without using c math library.The angle should be in radian otherwise the program will convert it to radian.The program gives me the wrong output which probably means that it has some logic errors.I think the problem could be with the formula …

Member Avatar for sarehu
0
87
Member Avatar for daviddoria

Last week I asked about this so I tried to write another example to try it out. I have a Line class which needs to have and members of type Point and member functions that return type Point. The Point class needs to have member functions that return type Line …

Member Avatar for daviddoria
0
407
Member Avatar for Enjoy

Hi all, In graphics mode, I need to read hexadecimal value from a file and assign it to variable for which i can add other value later. Eg : I need to read value 1007(hexadecimal) from a file and assign it to a variable. Later when i add 3 to …

Member Avatar for mathmagic
0
225
Member Avatar for chts12345

Hi all Is there anybody who can solve this problem? This is not a easy problem. Problem: Assume that George(S,X) is a function that returns a Boolean value, where S is a stack, and that the time complexity of George is O( log |S| ) , where |S| is the …

Member Avatar for jephthah
0
139
Member Avatar for dgr81

I am getting compiler output that makes me think I have some sort of syntax error like a missing ';' or misaligned (). But I've checked my code thoroughly and can't find anything wrong. What else could cause this kind of error? I included the compiler output along with my …

Member Avatar for dgr81
0
319
Member Avatar for R3B3L

Hello Everyone. Project outline: [QUOTE]I've to make a project which is the following: I'm a Car Distributor that distributes(sells) cars to different Car Dealers I should have a stock class with all the different types of cars I have ej(Toyota: 100, Mistubishi: 220, etc...) each type of car should have …

Member Avatar for R3B3L
0
128
Member Avatar for superjacent

I'm self studying from the book, C++ Primer Plus Fifth Edition, by Stephen Prata. The following relates to Chapter 13, Page 699, Programming Exercise #4. One task is to write the derived class method definitions based upon the given prototypes. The following are the said prototypes. [CODE="cpp"]class Port { private: …

Member Avatar for superjacent
0
189
Member Avatar for nurulshidanoni

I cannot compile my programming..abnormal programming..anybody whi knows where is my mistake? [code=C++] { int count, k; { count=0; myfile<<"i,j|"; for ( int i = 1 ; i < students.size (); i++ ) for ( int k = 1;k<students.at(i).examcode.size(); k++ ) { count=0; for (int colHead = 1; colHead <students.at …

Member Avatar for nurulshidanoni
0
135
Member Avatar for Saaddani

We're learning about functions in Intro to C++ and a problem is telling me my getInput() function is supposed to "get the user's weekly payrate" but at the same time it also says "remember the getInput() and displayInfo() functions are void." How can I get input if there the function …

Member Avatar for Ancient Dragon
0
129
Member Avatar for kireol

I've been trying different things all weekend trying to figure out what is going on here. If I log in to my server via a PC and telnet, it comes through just fine. So I know it's my code here is messed up. Here's my code [CODE] while(1) { mbstowcs(CHAT," …

Member Avatar for kireol
0
122
Member Avatar for Squeeker

Can an Interface file contain multiple classes? If so how would one implement this interface file (what specifications do you need to use to specify which class you are using)? If this is not legal or is a bad programming practice then please explain why. Thank you, Arielle

Member Avatar for Squeeker
0
154
Member Avatar for hafhag

Thank you for your advancing helping. I do have a problem in how to encode a bank account that has : 1. account number,user name , intial deposit and balance (updatable) 2. that a specific user can see his balance 3. a user can withdraw money 4. a user is …

Member Avatar for hafhag
0
288
Member Avatar for madfrenzy

hey I'm trying to run this program on netbeans on Ubuntu #include <windows.h> #include <GL/gl.h> #include <GL/glext.h> #include <GL/glu.h> #include <GL/glut.h> void myInit(void) { glClearColor(1.0,0.0,0.0,0.0); glColor3f(0.0f, 0.0f, 1.0f); glPointSize(9.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0, 640.0, 0.0, 480.0); } //<<<<<<<<<<<<<<<<<<<<<<<< myDisplay >>>>>>>>>>>>>>>>> void myDisplay(void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS); glVertex2i(400, 350); glVertex2i(100, 130); glVertex2i(150, 130); …

Member Avatar for Comrade Ogilvy
0
115
Member Avatar for Jboy05

how do I Write a function call WelcomeMsg which displays the message "Welcome back! I wish you have a great Spring Break". Then write a calling statement for it?

Member Avatar for Narue
0
85
Member Avatar for JamesMil

Here's a fairly simple piece of code to get a message from the user, limiting its length to 10 chars. Problems arise when the message is 10 chars or more, and the program enters an infinite loop. I think the problem is getline() leaving somethin on the stream, but I've …

Member Avatar for Narue
0
87
Member Avatar for m2185

I am working on a problem where I must show all perfect integers between 1 and 1000, as well as the divisors to get them. I can get the integers just fine with this code: [code]#include <iostream> using namespace std; void Perfect(int); int main() { for (int i = 1; …

Member Avatar for Ancient Dragon
0
90
Member Avatar for Lord_Polo

I have a txt file where data is arranged in a list eg: 0001 0002 0003 0004 etc... Andy i would like to change specific columns to the same data eg: | 0a01 0a02 0a03 0a04 |

Member Avatar for Lord_Polo
0
113
Member Avatar for dkwantee

hello! I want to know about string tokenizer. i have a file of the following format:- Studentname StudentID Studentgrades each is separated by a tab. and the size of the file is unknown. I have to read each line using string tokenizer..Well, i dont know much about this, can someone …

Member Avatar for Narue
0
91
Member Avatar for daymick

Hello, I would like to apply object-orientated programming in C++ to sets of 3D images. I would like to do 4 classes: -dataset:an array of 3D images, contain the nb of 3Dimages as an object -3Dimage:an array of 2D images, contain the nb of 2D images as an object -2Dimage:an …

0
60
Member Avatar for Run.[it]

Is the only way to stores strings as a variable in C++ is by having an array of type char?

Member Avatar for Run.[it]
0
97
Member Avatar for Lalarukh khalid

hi every body.... i need little help regarding project which we have to made in C++..... can someone guide me tht which type of topices can selected...... i am very much confused....:S

Member Avatar for Lalarukh khalid
0
278
Member Avatar for dophine

Hi all, I would like to know in what situation template is used instead of inheritance and vice visa. examples are appreciated. I just know template is static binding while inheritance is dynamic binding. so if speed is concern, template is better.

Member Avatar for Narue
0
139
Member Avatar for tones1986

Hey folks. I am confused as to how i can make a constructor take zero - or lets say 3 arguments. If i do this in my main.cpp: [code] const Vector v1; const Vector v2(1.0, 2.0, 3.0); [/code] And this in my vector.cpp file: [code] Vector::Vector(double new_x, double new_y, double …

Member Avatar for dophine
0
89
Member Avatar for Ripture

First of all, forgive the corny title, I couldn't resist once I thought of it. ;) I have a small assignment for a statistics class that had been giving me a little bit of trouble. How we did the assignment was left up to the students since it is a …

Member Avatar for vmanes
0
126
Member Avatar for stackOverflow

Hi all, In graphics mode, (using bgi).. is there any function like the printf statement when with %x gives the hexa equivalent??

0
82
Member Avatar for Lensva

[code] #include <iostream> using namespace std; class fibonacci { private: int num; public: long fibNum(int n); fibArr(); }; //============================ long fibonacci::fibNum(int n) { n=num; if (n<0) { return 0; } if (n<2) { return n; } else { return fibNum(n-1) + fibNum(n-2); } } //============================ fibonacci::fibArr() { int *Arr; Arr=new …

Member Avatar for Lensva
0
126
Member Avatar for technogeek_42

can any one knows how to convert a number to word like this 192 to one hundred ninety two i can't get the logic of that who can suggest of that i can't solve that.. plz help me

Member Avatar for technogeek_42
0
723
Member Avatar for Serling1

I'm trying to have a getData function transfer all the objects it is holding in its array to a new array so that the new array can be used in a friend function to print the objects' information. [CODE]void Set::getData(Set& tempSet) const { for (int i = 0; i < …

Member Avatar for Necrolis
0
454
Member Avatar for monroe85

#include <iostream> using namespace std; int main(){ double w,x,y,z,avg; cout <<" PLEASE ENTER FOUR ENTRIES OF MARKS"<<endl; cin >> w >> x >> y >> z; avg=((w+x+y+z)/4); if(avg>60){ cout <<"YOU PASS"<<endl;} else{ cout<<"YOU FAIL"<<endl; } cout<<"YOUR AVERAGE MARK IS "<<avg<< endl; return 0; }

Member Avatar for Necrolis
0
72
Member Avatar for harisshafiq

A machine with 32-bit integers can represent integers in the range of approximately 2 billion to +2 billion. This fixed-size restriction is rarely troublesome, but there are applications in which we would like to be able to use a much wider range of integers, such as factorial. This is what …

Member Avatar for ithelp
0
370
Member Avatar for tlox

I am trying to write a C++ program that will prompt the user to enter an angle value and calculate its sine,cosine and tangent without using c math library.The angle value denoted x,should be in radian,otherwise the program will convert it into radian before it computes its sin,cos and tan.So …

Member Avatar for ithelp
0
198
Member Avatar for GPXtC02

Just wondering if i can re-read something i just read in? [code] if(in_stream.is_open()) while(i<50 && in_stream.getline(temp, 50) && temp>0) { if(isdigit(temp)) PX1>>temp; else length=strlen(temp); [COLOR="Red"]if(length>1) { string1[]=temp; in_stream.getline(temp, 50) if(isalpha(temp)) string2[]=temp; else } else PX2>>temp;[/COLOR] i++; } in_stream.close();[/code] Hope it doesn't come across as vague but if towards the end …

Member Avatar for GPXtC02
0
804
Member Avatar for Bastler

Below was my original problem now i have done the following. Which is really just the structure for what needs to happen. Where i have written after my // basically i dont know how to do that part any help would be great. Cheers [code] #include <cstdlib> #include <iostream> #include …

Member Avatar for ravenous
0
82
Member Avatar for paradox814

I am working with a function declaration of: int func1(char *, unsigned int) to the best of my understanding, I am not allowed to modify this. Now my question is that when I actually write this program what is the name of argument 1 and 2 for example [code]int intToHexStr(char …

Member Avatar for paradox814
0
129
Member Avatar for sauron84

Hello, I am a novice user of VC ++ and I have built an interface using MFC. I have created a form and now I have to link the form components (buttons, etc..) to my source code. For example, I need to know what to do so that when i …

Member Avatar for sauron84
0
156
Member Avatar for mathmagic

Hi all, Just wanted to know if i could change the font style in text mode. I'm using Turbo C++.

0
75
Member Avatar for cVz

Good Evening (Morning to others) I would like to find how it would be possible to create a calculator with only one entry field, i have managed to make one with two entry fields resulting in a ([2LeftOperand] + [2RightOperand]) calculation...i have tried hiding the Right Text box, and even …

Member Avatar for david.crawford
0
97
Member Avatar for Bastler

Ok i have to do the following *Just a console program * Have a program with three lists, List 1 = Adjectives, List 2 = Adjectives, List 3 = Nouns. * The user will say if they want to input a word into the list, delete a word from the …

Member Avatar for Lerner
0
81

The End.