49,761 Topics

Member Avatar for
Member Avatar for hyperzero4

I'm a Comp Sci I student in college, and I have an assignment to make a quick sort that can sort vectors up to size 32000 with no problem. So, my program has been having a lot of trouble with big numbers, and every once in a while, I get …

Member Avatar for hyperzero4
0
165
Member Avatar for Stack Overflow

Hello fellow programmers, This is a tutorial about using pointers in the C environment. Please, don’t hit the back button; pointers aren’t as hard as you think. In fact without pointers, most of us would be lost in our latter programming years. Even though pointers are for the experienced, as …

Member Avatar for PeterPimmel
1
564
Member Avatar for naina_gill

I am familiar with programming culture. I want to start learning 3d games development. I want to know which language is most suitable for sustainable games development- directX or openGl or c++ or some third language??? Please guide me! Thanks & Regards *naina*

Member Avatar for naina_gill
0
129
Member Avatar for Wza

I'm trying to read data from a file using dynamic arrays, everything is great now except for one thing: if I have a file with lets say 20 students' IDs and their scores before starting the reading proccess, I did this: string *studentID; double *testScore; cout<<"Enter number of student: "; …

Member Avatar for mitrmkar
0
83
Member Avatar for Black Magic

Hey, Yet again i was just mucking around on DEV-C++ and made this code.. [code=c++]#include <conio.h> #include <iostream> using namespace std; unsigned long Double(unsigned long doubleMe) { return (2 * doubleMe); } int main() { unsigned long numberToDouble; unsigned long doubledNumber; cout << "Enter a number you would like to …

Member Avatar for Black Magic
0
95
Member Avatar for MAS12

Hello all, I have a CMUCAM 2 camera. I communicate with this camera through the serial port. The camera sends the data in non visible ascii format... My question what type of format should i use in scanf command. or is there any other way to read such format? Thank …

Member Avatar for Salem
0
63
Member Avatar for henpecked1

How does one declare a string as a data member in a class? I tried it this way, but my compiler says that's not it [code] class cdrom { public: cdrom(); void loadinfo(); float returncost(); void displayinfo(); void changedata (); private: float cost; string name; string cdtype; }; [/code]

Member Avatar for henpecked1
0
95
Member Avatar for rumencho

Hi all, I'm beginner in c++ programming and I'm reading a book on c++ but I just can't understand what means a term "identifier" ?

Member Avatar for Ancient Dragon
-1
62
Member Avatar for Mark515

anyone know code so that i have to insert a username into the program before i can continue doing anything else?

Member Avatar for Ancient Dragon
0
88
Member Avatar for Squeeker

Hello all, I have an assignment to create a base class for a vector. Now after reading through the instructions I am still unclear the instructions. I am NOT asking for you to do my homework! I just need some clarification. PLEASE DO NOT POST ANY CODE! Here is a …

Member Avatar for Squeeker
0
180
Member Avatar for mr.cool

I am getting this error and i don't know what it means. this is my code, i do have header files but i didn't include them. [code]int main() { [LIST=1] [*] cout<<"Welcome to guitar hero"<<endl; [*] cout<<"Try and press the correct letters on the line"<<endl; [*] cout<<"You will use the …

Member Avatar for mr.cool
0
100
Member Avatar for buddha527

I have written the following code that I will post below. Each time I try to compile it I receive the following error. [CODE]1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall OrderSet::OrderSet(void)" (??0OrderSet@@QAE@XZ) 1>C:\Users\Bill\Desktop\School1\c++\c++ spring cs2\program2\Debug\program2.exe : fatal error LNK1120: 1 unresolved externals[/CODE] Note I am using Visual Studios …

Member Avatar for buddha527
0
149
Member Avatar for complexcodes

I am working on this program and I am getting compilig error here is the code:- [CODE]#ifndef ACCOUNT_H #define ACCOUNT_H class Account { public: Account(double = 0.0); void credit( double); bool debit (double); void setBalance(double); double getBalance(); private: double balance; }; #endif[/CODE] [CODE]# include <iostream> using std::cout; using namespace std; …

Member Avatar for Lerner
0
109
Member Avatar for Mark515
Member Avatar for Mehwish Shaikh

I had got an assignment for sorting some data.. "Make a c++ program which takes data from a TEXT FILE, then sort it".. i made this program.. [code=cplusplus] #include <iostream.h> #include <conio.h> int main () { clrscr(); int sort[8]; cout<<"Enter DATA to be Sorted\n"; for(int get=0;get<=7;get++) cin>>sort[get]; //cin saves the …

Member Avatar for Ancient Dragon
0
174
Member Avatar for Black Magic

Hey, Was bored so *TRIED* to make this simple countdown program but i'm just not sure what to put in the for loop? [CODE=C++]#include <iostream> #include <windows.h> using namespace std; int main() { int countDown; cout << "Enter a number to count down from : "; cin >> countDown; for(int …

Member Avatar for hammerhead
0
107
Member Avatar for h0neydip

[code=cplusplus] struct wheel_node { int contents; wheel_node* next; }; typedef wheel_node* wheel_ptr; class wheel { private: wheel_ptr arrow; public: wheel (); void print (); void spin (int distance); void move_to (int number); }; [/code] The constructor wheel creates a circular linked list as follows: arrow -> 5 -> 40 -> …

Member Avatar for hammerhead
0
114
Member Avatar for winky

I am currently attempting to program my first game in C++ using Microsoft Visual Studios Express 2005. After doing some research, I found that it is missing several packages including the one that I need (windows.h). That's free software for ya. Anyways, I was having trouble finding a way to …

Member Avatar for Ancient Dragon
0
134
Member Avatar for Black Magic

Hey, I was using some code to write int's defined by user to a file but found when you use [CODE=C++]myfile.open ("lover_names.txt"); myfile << firstLover << " " << secondLover << " " << lovePercent << "%\n\n"; myfile.close();[/CODE] It replaces the other text in the text file, the answer will …

Member Avatar for Black Magic
0
82
Member Avatar for 3pid

Hi I`ve just started working with graphic in c++.I want to display a stack on the console . I taugth draw a rectangle as a stack.but the problem is I don know how to draw a rectangle! I write some codes but my compiler (Dev-c++) couldn support them. I found …

Member Avatar for William Hemsworth
0
234
Member Avatar for WeNeedThat

Its an assignment I have to submit, we have to make a maze using stack and input text file but I admit that i'm tottaly lost in this, something wrong with my code (or really alot of mistakes) please help! #include <iostream> #include <fstream> using namespace std; struct node { …

Member Avatar for WeNeedThat
0
97
Member Avatar for Nemoticchigga

Does anyone know if rs-232 c++ code written with the windows.h library is easily changed to support rs-485 and rs-422 or if its not similar at all? Thanks.

Member Avatar for Nemoticchigga
0
64
Member Avatar for bis student

Hi, could you explain how can I do the next ? A Member function named isVolumeBigger that takes as parameter a Box(Box class) object named another and returns bool value. The function compares the volume of the object with the volume of another and returns true if its volume is …

Member Avatar for Ancient Dragon
0
59
Member Avatar for ganiraju

Hi All, Radio Frequency Identification (RDFI) is a generic term for technologies that use radio waves automatically identify or locate people or objects. Incase you have any asset ideas or white papers on RFID technology please forward those to me. Thank you

Member Avatar for Ancient Dragon
0
139
Member Avatar for daviddoria

When trying to compile my code with g++ i get this: MayaFunctions.h:5:27: error: calling fdopen: Bad file descriptor in that line, I simply have #include "AnotherFile.h" Google told me this has something to do with precompiled headers, but I can't figure out how to turn them off. 1) how to …

Member Avatar for daviddoria
0
143
Member Avatar for hilofat

[CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream fin; string firstName; string lastName; int horseNumber; int betAmount; fin.open("jockey.txt"); if (!fin.good()) { cerr << "File not found\n"; return 1; } for (int i=0; i<10; i++) { fin >> firstName >> lastName >> horseNumber >> betAmount; cout …

Member Avatar for hilofat
0
70
Member Avatar for bamabambhole01

Hello, I am new in c++. Can somebody send me code for class ellipse. I am looking urgently for code. Regards,

Member Avatar for bamabambhole01
0
87
Member Avatar for recortebordes

Hi everyone! I have an interesting problem in borland c++. I have to write a DLL, which contains one function. The function's aim is to create a window with a progress bar, and a close button disabled. Then it downloads a microcontroller firmware via serial port to a device. After …

0
30
Member Avatar for jennyebrooke

Okay I'm gonna be honest with you... I have no idea what I'm doing... no not even a little. I'm in an online C++ class that I'm only taking because it was the last required course for me to graduate this semester... This is the last assignment due and I …

Member Avatar for littlestone
0
105
Member Avatar for Jennifer84

If I have a 2D vector like this that has 5000 elements declared. If I have filled 2500 of these elements with Numbers, what is the best way if I want to "emty" these elements so these elements will turn to 0 wich I beleive is the defaultvalue for all …

Member Avatar for vijayan121
0
232

The End.