49,761 Topics

Member Avatar for
Member Avatar for rudekhan

i just installed c++3.0 in XP downloaded from internet . But when i run very simple COUT<<"hello" code it doest produce out put. As i compile and run with out error but no output i can see. I have LCD is there any problem even i chaged the LCD and …

Member Avatar for rudekhan
0
266
Member Avatar for ELBUF

The title isnt too clear, and I wasnt sure what to title it, so Ill explain it here. I am making a calculator that can handle big numbers such as scientific notation and powers. A big number is one decimal (coefficient) times ten to a power (exponent). Ex. 3x10^15 or …

Member Avatar for ELBUF
0
123
Member Avatar for casjackkwok2001

Write a function that accepts an int array and the array’s size as arguments. The function should create a new array that is [B]twice the size of the argument array[/B]. The function should copy the contents of the argument array to the new array. I tried to run on it, …

Member Avatar for Ancient Dragon
0
158
Member Avatar for jimJohnson

I am working on an assignment and was wanting to know if one of u guys could let me know if I have 1. correct before I go to 2. Here are the instructions... 1. read in the data then displayed the data. 2 Add the following a. add a …

Member Avatar for jonsca
0
245
Member Avatar for v_janssens

Hi, I'm trying to find a way to calculate the eigenvalues and eigenvectors for a square symmetrical matrix. I have used MATLAB to do this before and the solution was as simple as; [V,D] = eig(A) I'm wondering if there is a simple solution like this in c++. I am …

Member Avatar for DavidB
0
299
Member Avatar for OnTheRadio

My assignment is: Your goal is to write a program that sorts a list of 4-letter words using different sorting algorithms and report the fastest method. First your program should prompt the user to indicate the number of words to generate. Your program should then generate a list of random …

Member Avatar for OnTheRadio
0
116
Member Avatar for dnalor

[code=cplusplus]#include <iostream> #include <conio.h> #include <iomanip> #include <fstream> using namespace std; const int numStudents = 5, numQuiz = 10, numAssign = 10, numFinal = 1; const int totalGrades = 21; void computeStudAver(const int grade[][numQuiz], double stAve[]); void computeQuizAver(const int grade[][numQuiz], double quizAve[]); void printall(const int grade[][numQuiz]); int menu(); int main(); …

Member Avatar for brillantes
0
84
Member Avatar for TheWolverine

Hi all, I was wondering if there is any standard way in C++ (perhaps in the standard library) of handling mathematical equations that are composed of +/- signs. For instance, if you are given the equations: [quote] y = +/- sqrt(x) z = +/- y [/quote] Is there an efficient …

Member Avatar for TheWolverine
0
148
Member Avatar for jdpjtp910

I have a code and its almost done. Its for a school project and I am stuck. I have DivSales and a CorporateSales.cpp. The programs should ask the user for 6 divisions quarterly sales. Display the results into a table and give a total of sales. My total feature is …

Member Avatar for Murtan
0
1K
Member Avatar for daviddoria

This code: [code] #include <iostream> class Parent { int name; class Child { int school; void test() { std::cout << this->name; } }; }; int main(int argc, char *argv[]) { Parent MyParent; return 0; } [/code] Generates this error: [code] error: 'class Parent::Child' has no member named 'name' [/code] Is …

Member Avatar for HealBrains
0
172
Member Avatar for rockstar8577

For some reason i cant output to a file unless it was already created. Here's my code. [code] fstream myfile; myfile.open (filename.c_str(), ios_base::in); if (!myfile) { myfile.close(); myfile.open (filename.c_str(), ios::out); avatar.name = name; avatar.init(); myfile << "Name = " << avatar.name << endl; myfile << "hp = " << avatar.hp …

Member Avatar for rockstar8577
0
114
Member Avatar for AJW

hello all, I'm taking a C++ class at my local community college. A project that was assigned was to make a menu program. I am about 90% done (I think), when I ran into this issue: when making a selection, the program doesn't know how to handle decimal numbers. The …

Member Avatar for AJW
0
108
Member Avatar for daviddoria

I have some code that uses _finite (I think from float.h) that my linker complains is not declared. I think this might be a "windows only" function. Is there an equivalent function that I can call that will work cross platform? Thanks, Dave

Member Avatar for daviddoria
0
211
Member Avatar for jigglymig1

i have to write a program that will read in a txt file that also has periods, exclamations, question marks and <CR>(returns). and do some other stuff. right now i am having trouble with comparing the words..... this is at the very bottom of my code [CODE]#include <iostream> #include <fstream> …

Member Avatar for mrnutty
0
83
Member Avatar for tnclark8012

I've been tasked with implementing either the min-max function or alpha-beta pruning to code AI for the game Gumoku (connect 5, vertical, horizontal, or diagonal). In both algorithms an evaluation function is called to analyze the board of play. Is there any "easy" way to do this? My initial plan …

Member Avatar for MyrtleTurtle
0
165
Member Avatar for D4n1sD

Hello, I am wondering how its possible, to make a server that you can connect to it, through IP and Port and than send data to it, For example I am trying to make a simple multiplayer game. But I am really amateur on connections etc. So please help me …

Member Avatar for D4n1sD
0
85
Member Avatar for BeyondTheEye

For an electronics project, I have to access the TxD, RTS and CTS pins of a serial port individually. Well, any 3 pins could be used, but those 3 are preferred. All I've been able to find on the microsoft website are functions to access the serial port as a …

Member Avatar for BeyondTheEye
0
257
Member Avatar for dieter22

Hi there! I'm new to c++ and I'm having problems with ifstream. I assume that my question is pretty stupid but here you go: I've got something like: [code=c] ifstream infile(inname); [/code] Furthermore I do have an array - let's call it Array - which contains several filenames I want …

Member Avatar for TerishD
0
380
Member Avatar for ndayala

[CODE]#include <iostream> #include <list> using namespace std; template <typename T> class superlist : public list<T> { public: // squish() is a mutator that "squish" together adjacent duplicate // elements in a list. // // Example #1: // [3, 3, 4, 3, 3, 3, 2, 8, 8] // becomes... // [3, …

Member Avatar for ndayala
0
109
Member Avatar for squarey

Hi Guys I want to build an application which can be used to empty the content of bad (remapped) sectors. At the moment I really dont know where to start, so I am hoping someone can give me a push in the right direction. It would also be nice if …

Member Avatar for Salem
0
195
Member Avatar for karolik

So I made a template...I tried declaring a string linkedlist like so... [CODE]LinkedList<string> str; [/CODE] Then i called the function insertLast to insert a string called hello..like so... [CODE]str.insertLast("hello")[/CODE] Then it gives me null pointer error...I cannot see how there can be a null pointer...help would be appreciated..Here is the …

Member Avatar for mattbond
0
181
Member Avatar for soapyillusion

Hi all, sorry to once agian come begging for help, but the professor wants us this time to have the program have a function read the word then for each letter have another function confrim if the letter is a vowel or not, then have the first function remove the …

Member Avatar for soapyillusion
0
357
Member Avatar for liveshell

I have following peace of code, when i check it with valgrind it gives me "537 bytes in 19 blocks are possibly lost in loss record 12 of 12" Following is the code: CManager.h [CODE]class CManager enum RespType_en { eInvalidRes = 0, eAuthRes, eActivateRes, eSetStateRes } map<RespType_en, string> m_mRespTags; [/code] …

Member Avatar for Salem
0
744
Member Avatar for Xhoana

Hi everyone! I'm new to C++ and i was told Dev CPP is a good compiler. I installed it and anytime i try to open it comes out this message: There doesn't seem to be GNU Make file in PATH or in Dev C++'s Bin path. Please make sure that …

Member Avatar for Salem
0
118
Member Avatar for react05

I need some help with postfix expression please. I've only been able to find examples about changing from infix to postfix. With the code provided below, I want it to the following: 1. if the token is an operator (it is a +, -, *, or /) a. two items …

Member Avatar for react05
0
201
Member Avatar for pamelaanne05

Here's my code for the upright triangle. Now I'm hard up on doing the code for inverted triangle, I'm working on it right now, but a little help would be great. [CODE]#include <iostream.h> #include <conio.h> void main() { int len,ht,ch,cho,sz,col=20,ctr=1; cout<<"\nTRIANGLE"; cout<<"\nEnter Size: "; cin>>sz; if (sz<5||sz>20) cout<<"Size must be …

Member Avatar for pamelaanne05
0
88
Member Avatar for daviddoria

I am trying to compile some old code a colleague gave me. I have MyClass.h [code] class MyClass { public: static int UseIndex; .... }; #include "MyClass.inl" [/code] MyClass.inl [code] ... int TreeNodeData::UseIndex=1; ... [/code] I am getting: [code] multiple definition of `MyClass::UseIndex' first defined here [/code] I got several …

Member Avatar for daviddoria
0
217
Member Avatar for desperado85

I have a CString : CString data; data.Format = ("!64.8 Px.1= 1200"); I would like to copy the number 1200 from data to another CString data2. Anyone can help? Thanks in advance

Member Avatar for mitrmkar
0
95
Member Avatar for karolik

So i have Class Parser and in this class is constructor [CODE]Parser(string s){ // constructor tokens = s.c_str(); // convert to a C string opStack.push(END); // initialize opStack }[/CODE] tokens was defined as const char *tokens in private ; That is in the parser.h file However when i try to …

Member Avatar for mitrmkar
0
108
Member Avatar for Abdel_eid

i need a c++ compiler with a graphical user interface which can easily be used and that contain many option like for example microsoft visual ,simply i can write the code on a gedit and compile it by using : g++ "file name" -o test ./test but it is so …

Member Avatar for Abdel_eid
0
147

The End.