49,757 Topics

Member Avatar for
Member Avatar for utmibnca2004

I need help with my project. I don't understand how I would approach the following situation and need some advice/suggestions. I am using a file to read info necessary for the project and using classes to access the data. class Car { public: void CarInit(string& make, string& model, string& color, …

Member Avatar for mahlerfive
0
144
Member Avatar for errorman

[code=language] #include <iostream> using namespace std ;char (name)[20]; int helps; void (checkOutVillage) (void); int main(void){ { std==cout << "Please Enter Your Name!" << std==endl; cin >> name; std==cout << "You Are On A Great Quest" << name; << std==endl; std==cout << "There Is A Small Village In Trouble. Should We …

Member Avatar for VernonDozier
0
367
Member Avatar for edouard89

Hello everyone I have to create a class that has the following: [quote] Your Field class is the base class from which you will derive all other Field classes. Your Field class has the following public member functions, all of which are virtual: * void display() - does nothing here, …

Member Avatar for edouard89
0
293
Member Avatar for mksakeesh

Please compare the two codes below why is the first one displaying output to monitor where as the second code is displaying some unwanted characters. CODE 1 ..... #include <fstream.h> #include <string.h> void main() { fstream File("test_file.txt",ios::out | ios::in | ios::binary ); char arr[13]; strcpy(arr,"Hello World!"); //put Hello World! into …

Member Avatar for Salem
0
156
Member Avatar for Duki

Hey guys, We're trying to work with a driver program for our robot. If we can grab the x and y coordinates of the Mouse we could send them to the controller for driving. Does anyone know how to capture the mouse movement into an integer?

Member Avatar for iamthwee
0
161
Member Avatar for errorman

I made a script and it keeps saying error C2144 and fatal error C1004 [CODE] #include <iostream> using namespace std ;char name[20]; int helps void checkOutVillage (void); int main(void); { std::cout <<"Please Enter Your Name!" <<std::end1; cin >> name; std::cout << "You Are On A Great Quest" << name std::end1; …

Member Avatar for ArkM
0
87
Member Avatar for BattlingMaxo

Is procedural animation the same as tweening? I have looked on the net but get different answers. BattlingMaxo

Member Avatar for Nick Evan
0
183
Member Avatar for coderoobie

:'( Hi geeks!, since I started programming I have never used qsort() for sorting. I also tried to consult books but, 'little or no success!'. Can anyone who know better help me to understand qsort() function. Please do it with an example! Happy forever even faced with c++!

Member Avatar for jencas
0
158
Member Avatar for haven_u

can someone explain the difference between get functions in C++... like get() or getline() and on what situation should we use any of these functions,

Member Avatar for Sky Diploma
0
74
Member Avatar for sciwizeh

I am working on a Matrix class that will eventually do a lot of stuff, but early on I have already hit a snag, how do I initialize (in a constructor) the 2D vector I have declared. [code=c++]//matrix class #ifndef MAT_CLASS #define MAT_CLASS //template <typename T> using namespace std; class …

Member Avatar for sciwizeh
0
181
Member Avatar for jammy's

can anyone write a program tofind sum of 2 numbers using friend function and programti implement digital clock

Member Avatar for Ancient Dragon
0
48
Member Avatar for godlike111

help me make a code please... i need a code when you pick one of the menu then the menu you pick will show up... then when you press anything it will go back to menu again.... can someone show me the code please???.... Thanks......

Member Avatar for murderotica
0
100
Member Avatar for less123

Project Title : Student Grading System Purpose : Calculate the grade and sort the result in descending How the user operate the software: 1) user run the software 2) an interface show on the screen 3) user keyin Input file name (example:studentsmarks.txt) 4) user keyin Output file name (example:studentresult.txt) 5) …

Member Avatar for murderotica
0
255
Member Avatar for daviddoria

It seems that writing ascii files changed significantly from c to c++. It moved from file pointers and things like that to being very easy, like [code] ofstream myfile; myfile.open ("example.txt"); myfile << "Writing this to a file."; myfile.close(); [/code] However, from googling it seems that binary file reading/writing has …

Member Avatar for jencas
0
123
Member Avatar for FtKShadow

Ok I have been working on a basic calculator for C++. The only problem is that I don't know how to make it so if you divide by 0 it couts something. Anyone help. I know it would be possible with if/else statement. Heres the code so far. [CODE=C++]#include <iostream> …

Member Avatar for FtKShadow
0
184
Member Avatar for ohyeah

C++ program that input rectangular matrix A nxm (integer) and finds out the indexes of most occurred element and counts how many times he occurs. I just can't do it :(

Member Avatar for murderotica
0
153
Member Avatar for cam875

Ok so I am going to be switching to an ubuntu linux machine soon to do all of my coding and I was wondering if anyone has a reference to the function calls you can use with it because I am used to windows programming so now in my code …

Member Avatar for cam875
0
126
Member Avatar for Duki

Hey everyone, A friend and I are trying to figure out how to interface C++ 2008 with COM ports for our robotics team. Is there a simple "template" we could go by, or is it different for every device? Could someone provide an example of how to transfer data to …

Member Avatar for Duki
0
453
Member Avatar for waldchr

Hi I was wondering how to create a window to run my programs in. It talks about it in many posts but I couldn't find anything on how to actually make one. I have no idea where to start so you will need to tell me pretty much everything (e.g. …

Member Avatar for Duoas
0
86
Member Avatar for rizahbeng

write a program that will read the weight of a package of breakfast cereal in ounces and output the weight in metric tons as well as the number of boxes neede to yield one metric ton of cereal

Member Avatar for William Hemsworth
0
138
Member Avatar for gispe

Hi ppl, im back here, but now with an array problem.. this time im doin a simple program to compare the numbers in an array n then say how are they ordered.. user must type those numbers.. [code=plusplus] #include "stdafx.h" #include <iostream> using namespace std; void comparison (int number[]); void …

Member Avatar for Ancient Dragon
0
127
Member Avatar for tetra860

hi there, iv came here not for myself but for the sake of my little bro who is currently stressing out big time with a program he making for a project. the problem he has is that his partner who he teamed up with has now decided to leave his …

Member Avatar for Ancient Dragon
0
70
Member Avatar for xyzt

hello do the member functions of a class occupy memory or just the member variables occupy memory?

Member Avatar for Narue
0
822
Member Avatar for timb89

i just started a new programming course and feel absolutley overwhelmed compared to my last one, we have to wrtie a program for the game of life. could somebody point me in the right direction, i am so confused right now... [url]http://www.comp.mq.edu.au/units/comp125/assignments/ass1/assignment1.html[/url] thanks! [CODE=cplusplus] #include <iostream> #include <fstream> #include <string> …

Member Avatar for Salem
0
90
Member Avatar for Sukhbir

Hi, Can any body explain me about overloading concept of () operator? I need to know why do we need to overlload () operator and how do we achieve that? Thanks in Advance

Member Avatar for Narue
0
121
Member Avatar for Maxine

Hi guys, I just got a headache trying to work with some files with .wlc extesions. I would like to know which applications open such files and how can i access the content. URGENT PLEASE.

Member Avatar for ArkM
0
99
Member Avatar for OmniX

vector<string> div; div.pushback("a"); div.pushback("b"); div.pushback("c"); for(int i= 0; i < div.size(); i++) { cout << "Letters: " << div[i] << endl; } cin.get(); Output: Letters: a Letters: a, b Letters: a, b, c I would like the output like this: Letters: a Letters: b Letters: c Thanks for your help …

Member Avatar for iamthwee
0
115
Member Avatar for amrhesham9

hello , well i have to deliver a program that demonstraits classes and inheritance , but i don't have any ideas

Member Avatar for Ancient Dragon
0
3K
Member Avatar for murderotica

Hello there! I'm currently doing some VC++ programming. I'm using MFC programming and DLL which is explicitly linked. I have placed my initialization and the usage of GetProcAdress inside my "buttonClicked" function. When a button is clicked, the function in the DLL should be called. [CODE] void CSample::buttonClicked(){ if(hLib){ pSampleFunc …

Member Avatar for murderotica
0
153
Member Avatar for mfareed

Can somebody help me with the CRC (Cyclic Redundancy Code) algorithm implementation given below: There is a three byte packet header. <--------1st byte-----><--------2nd byte-----><--------3rd byte-------------> --------------------------------------------------------------------------------------------- | 8bits | 8bits | 3 bits| 5 bits (CRC ) | --------------------------------------------------------------------------------------------- for example: 0D 0B 40 ---> Input Data stream ( 19 …

0
53

The End.