49,761 Topics

Member Avatar for
Member Avatar for suutukil

Please help me with my assignment in c++! Write a program that will input 10 numbers and display the sum in a ASCENDING ORDER. please help me i really need this badly...

Member Avatar for suutukil
0
616
Member Avatar for jdam7459

I am having trouble getting Windows to open the file "results1.txt" in the directory "Result Sets". When I run it I get the error: "results1.txt" is not a recognized as an internal or external command, operable program or batch file. But when I check to see if the file is …

Member Avatar for marco93
0
128
Member Avatar for serdengil

Hey guys, I do have a main function and need to write the class. I just need to where should I start. I am a new in C++ but the prof. asked us to write the class code of this calculator. He already gave the main function and the purpose …

Member Avatar for Lerner
0
120
Member Avatar for DarthPJB

I return with another perplexing issue that I just can't figure out, a generic and unhelpful"std::bad_alloc at memory location" error. Before I get to the code, some background... Having finished my uber-awesome 2D engine (thanks entirely to you guys) I decided it was time to break open the can of …

Member Avatar for DarthPJB
0
318
Member Avatar for ticktock

Hey all, I am fairly new with C++ and I registered here to ask for suggestions on how I can create my project. I proposed to my professor that I will create a scientific calculator with "additional functions". By additional functions I mean like a SC with that can solve …

Member Avatar for ticktock
0
139
Member Avatar for hurbano

Im having trouble fixing this error on my program. Any help would be greatly apprecitated. [code=c++] #include <iostream> using namespace std; int main () { char choice; cout<<" Is it after 12 noon? (y/n)" <<endl; cin>>choice; if (choice == 'y') cout<<" Good afternoon, world!"<<endl; else if (choice == 'n') cout<<" …

Member Avatar for DarthPJB
0
81
Member Avatar for Talguy

I am not asking anyone to design the parser for me, this is something i would like to do myself so that I can learn how to do it in the future. I am entering into a IEEE 24 hour programming contest with two other people. I have the problems …

0
63
Member Avatar for phillipeharris

I am confused as to why I am getting this on GCC. I have all the flies in the same directory, I have have closed the compiler and reopened it and I am still get this error. I am getting oters too but I am sure that can be fixed …

Member Avatar for ilikelampard
0
156
Member Avatar for Elektrikz

Hello guys. After some time searching around the forums for a thread about an e-book for crash course from C++ to Java and no luck I decided to post a thread about it. So my question is,does anyone has or knows such book? Thanks in advance.

Member Avatar for tux4life
0
281
Member Avatar for lotrsimp12345

#include <iostream> #include <stdio.h> #include <fstream> #include <string> using namespace std; int main() { int number_Of_Lines_To_Print_From_End=0; char file_name[20]; streampos length; cout<<"enter file name that needs to be opened\n"; cin>>file_name; cout<<"enter number of lines to print from end of file\n"; cin>>number_Of_Lines_To_Print_From_End; fstream file; file.open(file_name, ios::out ); if(file.is_open()) { cout<<"the file opened\n"; …

Member Avatar for lotrsimp12345
0
131
Member Avatar for swolll

Here is my code: [ICODE]#include <iostream> #include <string> #include <iomanip> #include <cmath> using namespace std; int main() { const double e = 2.71828; double t, f, n, B, VoltageGain; cout << "Please enter the time in hours the culture has been refrigerated: "; cin >> t; cout << endl; while …

Member Avatar for swolll
1
593
Member Avatar for lotrsimp12345

In unix if you create and open a file by using 9 digits numbers in the open function it seems to work but in C++ you only don't have a parameter to do that rather you have ios_base. Just wondering if there are owner,group and world settings that can be …

Member Avatar for lotrsimp12345
0
111
Member Avatar for Samyx

Hi everyone. I want to read a file and store each word in an array. I also want to know how many words there are in the file. After I do this, I want to reverse the words from two different files and see if they are anagrams. Here is …

Member Avatar for VernonDozier
0
172
Member Avatar for hao001

[ICODE] #include <iostream> #include <algorithm> #include <string> using namespace std; struct employees { int em_id; string em_name; string position; string gender; }; void read(employees record[], int max_1); bool IDsort(const employees &a, const employees &b) { return(a.em_id < b.em_id); } char Namesort(const employees&a, const employees &b) { return(a.em_name < b.em_name); } …

Member Avatar for VernonDozier
0
149
Member Avatar for lotrsimp12345

O_RWDR opens a file for read and write and pmode allows you to specify permission for each of the users? WHAT DOES IT MEAN BY WHAT PMODES AND O_RDWR ARE AVALABLE ON YOUR SYSTEM? CONSIDERING I AM USING VISTA I HAVE NO IDEA. I HAVE THE ABILITY TO READ AND …

Member Avatar for lotrsimp12345
0
534
Member Avatar for Jennifer84

I have a little special question about the for loop. Normally you could do the count as I have declared with a count from 0 - 10. What I do inside the loop is to identify many scenarios if the count should start from 0 - 10 or vice versa …

Member Avatar for puluke
0
126
Member Avatar for fallopiano

Hi all. I recently wrote a python program that takes a screenshot of the current active window. After taking that screenshot, it saves it as a bmp (using PIL), and then goes thru each pixel, looking for a certain color. If it finds that color, it moves the mouse to …

Member Avatar for fallopiano
0
126
Member Avatar for gilpin

Hello everybody, I want to create a program that removes the first line from a text (csv) file (which is a header). I used this code: [CODE] string deleteline = "Name, ID, D.O.B, etc., etc."; //contains the Header information to be removed string line; ifstream sup; sup.open("DOWNLOADED_DATA.csv"); ofstream temp; temp.open("temp.csv"); …

Member Avatar for gilpin
0
170
Member Avatar for ellimist14

I really need help with this guys. This compiles and runs but does not give me the right output. tfile.data: Seth 19 1.7 Austin 20 1.8 Michael 21 1.9 [code]#include <iostream> #include <fstream> using namespace std; int main() { ifstream fin; fin.open ("tfile.data"); if (fin.fail()) { cout <<"ERROR"; exit(1); } …

Member Avatar for NathanOliver
0
86
Member Avatar for lebronjames

Hi yall, So what my code is supposed to do is basically count the number of paranthesis that the user enters and hit me back with the result. The code below works perfectly when there are no white spaces in the user's input. But when white spaces are present, It …

Member Avatar for lebronjames
0
81
Member Avatar for willywonka

Hi all, I am a first year student at the university of South Africa. I am doing my degree via correspondence, thus no lectures. I am working through the prescribed book as best i can but they still assume a little bit of fore knowledge of programming which i don't …

Member Avatar for willywonka
0
135
Member Avatar for mz_rigel

I need help with my homework assignment for school. I was able to get everything to work fine when I just put everything in int main() without using functions but when I tried to separate everything into functions the program is not running correctly and although I don't get an …

Member Avatar for KonkaNok
0
119
Member Avatar for syd919

hello I am trying to desing a simple rss feed reader, I am using curl to load the source code of a webpage and store it in a string and create an xml file, I then use xerces-c to parse the xml file, this works well but i need to …

0
64
Member Avatar for syd919

hello I am trying to design an rss feed reader using xerces-c and im using dom parsing, I am new to this side of programming and everything I know so far is self taught. I can read an xml document that is in my computer but I can't access external …

Member Avatar for syd919
0
119
Member Avatar for daviddoria

I made 2 classes, Point and Point3D: Point.h: [code] #ifndef POINT_H #define POINT_H #include <iostream> template <typename T> class Point { protected: T X,Y,Z; public: Point(const T x, const T y, const T z) : X(x), Y(y), Z(z) {} T getX() {return X;}; T getY() {return Y;}; T getZ() {return …

Member Avatar for DdoubleD
0
530
Member Avatar for hao001

Hi..i saw this a randomly..i got some part don't understand: [url]http://www.daniweb.com/forums/thread214624.html[/url] @ancient dragon's reply 1) const unsigned int MAX_SIZE = 2; student array[MAX_SIZE]; Q: Why MAX_SIZE = 2 ? 2)15: void insert(student array[],const unsigned int MAX_STUDENT); 33: void mySort(student array[],const unsigned int MAX) 55: void display(const student array[], unsigned int …

Member Avatar for hao001
0
128
Member Avatar for icu222much

I am new to programming in C++. I have a bit of experience in Python and ActionScript3. I decided to pick up C++ so I downloaded Dev-C++ complier. I tried to run the following code but it doesn't seem to do anything. I complied the code, and it did not …

Member Avatar for hao001
0
204
Member Avatar for krellor

I haven't wrote in C++ for a long time so I decided to brush up a bit by writing some basic programs. I wrote a class that allows for basic arithmetic of infinitely large numbers (or as much as you have memory for). Here is the code. [CODE] class largeInt …

Member Avatar for krellor
0
144
Member Avatar for gerbanzo129

Hey i have a simple output program that i can't seem to figure out Home Owner Price of Home Seller's Cost Agent's Commission Garcia *****100000.00**********6000.00**********1500.00

Member Avatar for gerbanzo129
0
78
Member Avatar for Der_sed

[CODE]#include <iostream> #include <cstdlib> using namespace std; const int arrSize = 100; bool isPresent(int ,int ); int main() { int myArr[arrSize]; int input; for (int i=0; i<=arrSize; i++) myArr[i]=rand()%200; //creating array with random numbers //sorting random numbers for (int j=0; j<=arrSize; j++){ for(int k=0; k<j ; k++){ if (myArr[j] < …

Member Avatar for VernonDozier
0
92

The End.