49,761 Topics

Member Avatar for
Member Avatar for gerard4143

Does anyone know how to do this? I attached a program that collects all the command line arguments into a map container noting how many times each command line argument occurs. Now I want to sort this map of information by loading a vector with iterators that point to each …

Member Avatar for vijayan121
0
519
Member Avatar for compgeek22

Hello. I am trying to run a simple postfix notation code. It builds but doesn't run. Can anyone tell me if it's my code that is stopping it from running? Here is my code: `int main(int argc, char *argv[]){` char *a = argv[1]; int i, div, N = strlen(a); stack<int> …

Member Avatar for np complete
0
239
Member Avatar for jeaninem71

I am a newbie so please forgive my ignorance. I need help with this program, it is outputting 1s for the functions. I know it's something simple, but like I said I am new and don't know what to do. #include <iostream> #include <cctype> #include <string> #include <iomanip> #include <cmath> …

Member Avatar for np complete
0
305
Member Avatar for jeaninem71

Here is a second one I am stuck on. This one is working correctly, but I didn't know how to go about doing a function for the output of line 9 so that put me into problem of not being able to figure out how to get line 10 to …

Member Avatar for np complete
0
220
Member Avatar for jeets1892

Hello, Please take a look at the below code - #include<iostream> #include<ctime> // for the time() function #include<cstdlib> // for the srand() and rand() functions using namespace std; int compInput; int userInput; int die1 = 0; int die2 = 0; int Dice () { // set the seed srand(time(0)); // …

Member Avatar for jeets1892
0
2K
Member Avatar for poloblue

Good Afternoon, I'm a little difficulty with this little program. The error is argument of type int (*)[5] is not incompatible with parameter of type double. I'm getting this error on swapFour(&a, &b); Here is the whole program code double a =102.39, b=201.59; double c=30.99, d=48.99; double e=55.21, f=95.35; //call …

Member Avatar for WaltP
0
167
Member Avatar for Tinnin

Hello. I'm doing an exercise whereby I need to test if a word is a palindrome. My code for the function is as follows: #include "test_palindrome.h" using std::string; bool is_it_palindrome(const string s) { bool palindrome = true; for(string::const_iterator iter = s.begin(); iter != s.end(); ++iter) { string::const_reverse_iterator rit = s.rbegin(); …

Member Avatar for WaltP
0
154
Member Avatar for triumphost

So I've started learning makefiles today for a project I've been working on. The project uses OpenGL and GDI. I decided to dive right into make files and so far, everything compiles but at the very end, it gives a bunch of undefined references. Thing is, when compiled in codeblocks, …

Member Avatar for vijayan121
0
2K
Member Avatar for Suzie999

Just wondering what general thoughts there are regarding the pros and cons of `using namespace NameSpace;` vs `NameSpace::Method` Such as, are there any performance gains with one or the other etc...?

Member Avatar for vijayan121
0
257
Member Avatar for Tinnin

Hi everyone. This regards exercise 5-6 of "Accelerated C++". I am asked to rewrite a function so that instead of using erase() to remove an element (of a failing student), I should copy the elements (of the passing students) to the beginning of the vector and then use resize() to …

Member Avatar for Tinnin
0
115
Member Avatar for gopi17

I'm an enginnering student, our lecturer has ask us to create an opengl app tat shows the bersenham so far i have derive the algo and the pixels...but i don't know how to draw a line between those pixels.. this is what i have so far void init(void) { glClearColor(1.0, …

Member Avatar for myk45
0
339
Member Avatar for Tharsu

I have an excel spreadsheet with multiple entries for one person.I want to merge the data and create a letter.The problem is each entry comes on a different page.I want to have the multiple entries on one page for that particular person.Please help me!

Member Avatar for myk45
-1
20
Member Avatar for dreday92

Can someone tell me why i get the error code "ISO C++ forbids comparison between pointer and integer" for lines 135 and 149 #include <iostream> #include <iomanip> #include <string> using namespace std; //Structure used to store the name, number of the players, and the number of points of each player …

Member Avatar for Geli19
0
169
Member Avatar for MoBaT

I am attempting to complete the towers of hanoi game using 6 towers and an n amount of rings. I attempted to try moving each ring into a seperate tower and then work each tower one by one using recursion, but I could not get an appropriate output. I have …

Member Avatar for np complete
0
116
Member Avatar for Bob

*From the Visual C++ Team Blog:* Visual Studio Express 2012 for Windows Desktop is now available for download. http://blogs.msdn.com/b/vcblog/archive/2012/09/12/10348456.aspx Additional details and further discussion here: http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx *ETA: post intended for the News Stories section -- if the Mods could kindly sort that for me?*

0
102
Member Avatar for sandhu.sandhu

I need some project ideas on cryptography/information system securoty for a simple and small project.......

Member Avatar for np complete
0
131
Member Avatar for jeets1892

Please take a look at the below code #include <QtCore/QCoreApplication> #include <iostream> int main(int argc, char *argv[]) { using namespace std; double purchaseAmount; double paidAmount; float balance; int change, quarters, dimes, nickels, pennies, tenDollar, fiveDollar; // declare variables cout << "Enter Total purchased amount" << endl; cin >> purchaseAmount; cout …

Member Avatar for zeroliken
0
3K
Member Avatar for AutoPython

Hey! I've recently come back to C++ to tackle another project, but I've run into a problem I can't figure out. #include <iostream> #include <string> #include <fstream> #include <direct.h> using namespace std; int main() { string variable = "AwesomeName"; mkdir ("test"); ofstream write ("test\\" (variable+".txt").c_str() ); // this the place …

Member Avatar for AutoPython
0
4K
Member Avatar for kesha.marufu

An i.t department gives an award to each student who has passed @ least three course with a mark above 69 in third year,there are five courses in third year, write a flowchart and pseudo code that captures the matk for the 5 courses for a student and display all …

Member Avatar for myk45
0
143
Member Avatar for angel.heaven.58367

My problem goes something like this. I have a variable of 5 arrays a[5] for storing the 5nodes of a network. The network is randomly formed by the random number generator. I have the time of travel for each paths of the network. All the nodes may not be connected …

Member Avatar for np complete
0
195
Member Avatar for Geli19

Hello Everyone. I am having trouble creating new objects in a loop. I am using: DataType *Ptr = new DataType (); I use this in the beggining of the loop then end the loop with: delete Ptr; Each constructor and destructor gets called each time the loop is executed.... but …

Member Avatar for Geli19
0
5K
Member Avatar for TimLloyd31

How will I arrange 5 numbers in ascending order and determine the highest? what codes will i use or how will i do it? (using dev c++)

Member Avatar for np complete
0
2K
Member Avatar for Faiza akmal

Im new 2 c language..which compiler is the best f0r c language?gcc and turbo c

Member Avatar for nitin1
0
98
Member Avatar for sidvb1

Here I have the classes Logger and Driver. Driver takes the singleton class of Logger, and logs the same statement 10000 times. I want to use this logger, so that it runs in the background and only logs every so often. This will force the program to not use too …

Member Avatar for triumphost
0
1K
Member Avatar for daniel.krishnasamy

Please Help me with this Date Operation Program. I think that this works....yet! Thanks #include <iostream.h> #include <conio.h> int a[7]={1,3,5,7,8,10,12}; int b[7]={4,6,9,11}; class manipdate { int date; int month; int year; public: int d,m,y; void getdata() { cout<<"\n\n Date : "; cin>>date; cout<<"\n Month : "; cin>>month; cout<<"\n Year : …

Member Avatar for Ancient Dragon
0
544
Member Avatar for daino

Hi Anyone know of a compatible charts Library for inserting charts into a PDF file created by PODOFO? I was thinking of Gnuplot but not sure if there's a better option out there. Thanks danny2000

Member Avatar for daino
0
63
Member Avatar for yashikagg

How to store and retrieve an image in MS Access with OLE object Datatype using C++/Qt.I have searched a lot but everywhere found visual basic and VB.net codes..Can I have a code to do it in C++ with Qt.

0
37
Member Avatar for Vasthor

#include "splitzer.h" using namespace std; // find all the lines that refer to each word in the input map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split) { funtion body; } error: line 3, expected initializer before using error: line 6, expected constructor, destructor, or type conversion before "<" …

Member Avatar for rubberman
0
81
Member Avatar for Sasquadge

Hey guys I'm running into an error. I've got the tree and the base working. But now that I'm to the trunk it'll only center the first one and the rest are to the left. any suggestions? #include <iostream> using namespace std; double height; int main() { cout <<"This program …

Member Avatar for Sasquadge
0
117
Member Avatar for silvercats
Member Avatar for arkoenig
0
351

The End.