General C++ Programming - April 2015 (Page 26)

Problem in linked stack(Dynamic Stack)
 
when the program is executed there are 4 options a: push b: pop c: view stack d: exit all of them are working fine according to what they are supposed t...
[4 replies] Last: woo hoo now its working fine. satck instead of stack was the problem.... (by amarjit86255)
by oseri
Returning pointer to derived form a base class function
 
Is that posibble with covariant return types ? Namely that code : class Derived; class Base { public: virtual Derived* clone() const { return ne...
[2 replies] Last: Thanks, it works now. Sometimes it seems that I lack such basic knowle... (by oseri)
by yj1214
g++ what warning is this?
 
Warning: corrupt .drectve at the end of def file. I tried to compile my main.cpp which includes sdl.h and i'm getting this warning message. (by the way the...
[1 reply] : http://lmgtfy.com/?q=Warning%3A+corrupt+.drectve+at+the+end+of+def+fil... (by TarikNeaj)
by yj1214
g++ where does -L look for?
 
Whenever I try to use -L flag, ex. -L/myPath , It doesn't work. But whenever my files are in the same directory and use this flag, -L. it works. So my qu...
[1 reply] : Note that a path starting with / is an absolute path on Unix-like syst... (by Peter87)
Priority Queue max functions?
 
Hello, today i got stuck on creating 2 functions that could find a max and extract the max from a priority queue. I have done pretty much everything except thes...
[1 reply] : If this is supposed to be a true priority queue (maintaining heap prop... (by Smac89)
dynamic memory
 
Whats the difference between these 2 and why should I use one over the other? int i; cout << "how many dogs?" << endl; cin >> i; int dogs ; ...
[6 replies] Last: Thanks Albatross for the in depth explanation and your funny comment. ... (by cppnoob25)
Association and composition example design
 
Hi I am really frustrated..How can I design these three classes to interact with each other class Sale{ private: float total_sale; ...
[7 replies] Last: I am doing like Aceix said... Its going well until now (by csstudent123)
by kccpo
Finding an average without a known number of inputs
 
Hello, I am going through a C++ Class and my instructor gave us this assignment without much background or guidance. I need to allow the user to enter num...
[9 replies] Last: WOW! That absolutely did the trick. I took out all but the first one. ... (by kccpo)
Having problems with Visual Studio 2013
 
This is my code: #include <cstdio> #include <iomanip> #include <iostream> using namespace std; int main(int argc, char ** argv) { int y; x = 34; printf("x...
[2 replies] Last: Ohhhhhhhh. haha I can't believe I didn't notice that. Thanks! (by bkharoud)
Derived vector of Ptrs
 
I'm currently trying to find a list of derived classes in a list of unique_ptr<BaseClass>(Ptr from now on). Problem is, it can't convert the derived class into ...
[3 replies] Last: Bump because it's buried to the second page. I'm honestly not really ... (by UglyIgloo)
by Matep
Sorting with my own function
 
I have a vector of pairs which i need to sort through both first and second element. I sort them using this function: bool f1(pair <int,char> a, pair <int,cha...
[3 replies] Last: Remember, if (a.second < b.second), return true. Else if (a.second == ... (by Duthomhas)
Menu driven program using my own Sin,Cos,Tan (1,2)
 
I am having trouble properly defining the functions i need and getting them to work right I'm not sure what i really need to be doing. i have the menu down but ...
[20 replies] Last: Heh, I've misunderstood posters' questions before. Don't feel bad. We ... (by Duthomhas)
questions about switching to intel compiler
 
I'm considering switching to the intel compiler from the standard VC++ compiler included in visual studio ultimate... costs do not really concern me here, for r...
[1 reply] : You can find lots of answers here http://lmgtfy.com/?q=intel+compiler... (by TarikNeaj)
Quick question HELP PLEASE!
 
Hi i need to write a code that gives a percentage of a percentage ex. 25% discount and once again a 25% discount on merchandise can anyone help me write ...
[2 replies] Last: I know that for one percentage i would just put price * 50/100; i ju... (by alexwood)
Assistance required for program
 
The program below is one made for a weekly budget after gross pay has been calculated and taxes have been deducted. Information has been given to create a file ...
[no replies]
create a program
 
I was to ask to make a program from this question : Write a program that calculate the average exam score for a class. The program will stop when the user ent...
[3 replies] Last: Do you at least have any programming done so far? Or are you confused ... (by closed account 2LzbRXSz)
R6010 Error
 
This is my data. john smith#165980076#8148337965#3rd & state st#erie#pa#16506 R6010 -abort() has been called This was today's lab... I spend Four hour and its...
[1 reply] : Hey. Please edit your post and put all of your code between code tags.... (by TarikNeaj)
Develop GPA for specific examination
 
This assignment must be divided into 4 parts which is: 1. Add Student record 2. View report 3. Help 4. Exit 1st part(add student record) *once selected ...
[1 reply] : Start by creating main. (by TarikNeaj)
Expected primary-expression before "next" ? I can't figure this out, is my struct wrong?
 
#include <iostream> #include <string> #include <cmath> // structure for date format struct date{ int month, day, year;}; date today, next; using namespa...
[1 reply] : Please use code tags for all of your code, its under the format sectio... (by TarikNeaj)
minesweeper/GetPixel()
 
Hi, I'm trying to write a program that plays a minesweeper game by itself. I think I can write all of the code just fine, but I don't know how to have the pr...
[4 replies] Last: Not a direct answer to your question, but I've done a couple of simila... (by toad)
April 2015 Pages: 1... 2425262728
  Archived months: [mar2015] [may2015]

This is an archived page. To post a new message, go to the current page.