49,757 Topics

Member Avatar for
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
165
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
153
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
114
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
140
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
Member Avatar for triumphost

I've been trying to do this for some time. I can do it with a vector but with a const void*, it crashes badly! My bad code: Bitmaps::Bitmaps(const void* Pointer, int Width, int Height, uint32_t BitsPerPixel) { Pixels.clear(); memset(&Info, 0, sizeof(BITMAPINFO)); width = Width; height = Height; size = ((width …

Member Avatar for triumphost
0
185
Member Avatar for lim9I

#include<iostream.h> class ADTqueue { private: int queue[10]; int head,tail; public: ADTqueue() { tail = -1; head = 0; } int empty() { if(head == tail+1) return (1); else return (0); } int full() { if(tail == 9) return (1); else return (0); } void append(int num) { if (!full()) { …

Member Avatar for rubberman
0
222
Member Avatar for satishchavan170
Member Avatar for 45lbplates

I'm a beginner so bear with me. I have a string and in it there is a character I want to remove. What is the best way to remove it? The shit I've found on the internet, it's making my head explode. I found this: str.erase(std::remove(str.begin(), str.end()), str.end()); Why is …

Member Avatar for vijayan121
0
5K
Member Avatar for poloblue

Good Afternoon, I'm fairly new to C++ programming, right now I'm having difficulties completing an assignment that consist of a student database. I really appreciated if someone would help me or give me some guidelines to complete the assignment. The assignment consists of that the database only generates one text …

Member Avatar for deceptikon
0
192

The End.