General C++ Programming - November 2014 (Page 8)

Maze / Graph
 
Hello! Well I need help with the following http://pastebin.com/VeNXqPzY Regards!
[1 reply] : [quote=dawoodr]Hello! Well, I need help with the following. Given a ... (by Smac89)
How to: Create Umbrella Type
 
Hey there, I was wondering if you know way to create an "umbrella" type/class/struct of existing c++ types or windows types. Let me explain. I want to addr...
[4 replies] Last: Wrap references. #include <iostream> #include <boost/any.hpp> #inclu... (by JLBorges)
3D Game Engine
 
Hi, I am a PAWN and LUA programmer. I have recently started learning C# & C++, due to the reason that PAWN and C++ are really similar. I know the basics and mo...
[3 replies] Last: @Avilius, I've been learning C# like 2 months before I started learnin... (by skibi184)
using std::string for splitting up a line
 
If I had a line like: G3421,accountant,Gary Daniels,gdaniels72@gmail.com and I have int pos = line.find(",", 0); if (pos != std::string::npos) { ...
[1 reply] : erase already read characters from original line http://en.cppreferenc... (by MiiNiPaa)
by johms
Printing even and odd numbers in alternating pattern
 
Can somebody please help me with this?? We never really had a thorough discussion yet about if-else statements and while.. but our teacher already gave us a di...
[2 replies] Last: Mr. Konstantin2.. thank you very much for the info.. (by johms)
by Maco10
Compilator error
 
I am a bit lost. I have to make an exercise, and the test probes return: ====== Sortie de g++ (1): ====== /tmp/tmpl2vzw2/test.cc: In function ‘_1aa6692...
[3 replies] Last: As you just said, override the operator: struct Triangle { Point... (by TwilightSpectre)
Difference between (const string&) and (string&) pass by reference.
 
I wrote a code to calculate the scalar product of two vectors. I can't seem to fully understand the passing by reference and the const. When i put in paramters ...
[1 reply] : 1. Strings "First " and "Second " written in 15, 16 lines are hardly c... (by Konstantin2)
pointers to pointer array
 
void StringofCars::push(Car more) { cout <<"11"<< more.carNumber << more.destination << more.kind << more.loaded << more.reportingMark << endl; Ca...
[2 replies] Last: Good catch! thanks :) (by timk123)
Theater Seating c++ error
 
In the following code, when I would select View Menu Prices, Purchase Tickets, and Sales Statistics the wrong price would display. For example if tickets in row...
[1 reply] : int price ; is local variable in every function. When you ask user f... (by Konstantin2)
Calendar Help (need to combine my code into a single function)
 
The assignment reads "Write a void function named displayCalendarDays. This function is passed two input parameters. The first parameter is an int that represe...
[1 reply] : void disp(const int startDay, const int days) { if (startDay < 0 |... (by Konstantin2)
by RotciV
Kth largest array
 
So I'm trying to make a function that prints out the kth largest number in the array but its not working. Can you guys help me find out whats wrong with my code...
[1 reply] : You should actually explain how your function works rather than leavin... (by Smac89)
Prompt the user for two years. Print all Comedy movies that were released between those two years.
 
this code works just in case anyone has this assignment. i figured it out yesterday. please help me out on my other assignment.. you should find it on todays da...
[no replies]
Magic Square
 
My knowledge about C++ is very limited, just keep modifying the source code from internet to fix the problem. The expected output is this(just one example):...
[no replies]
typedef template with static const member
 
Hi, class Tracker { public: static const int type; typedef cv_types::CvType<type>::type_t type_t; }; const int Tracker::type = 1; ...
[1 reply] : nvm, it works when I put the initialization into the class: class T... (by meleagrosy)
Using Overloaded [] with Overloaded =
 
Hey, I am trying to write a statement in my program like this: c = value where c is an object I have created with an int array member variable an...
[1 reply] : Make another, non-const variant of operator which will return value b... (by MiiNiPaa)
Basic Exercise
 
I am trying to come up with code that prompts a user to input three numbers (integers). The program should then output the numbers in ascending order. I am hav...
[7 replies] Last: its "manual sort" without looping e.g. for two variables: cin>> a; c... (by anup30)
Error in minHeap Implementation for C++
 
this is a beginner work and I'd like te have a heap which contains any item inserted by me. However, when I insert the values, if I delete the min value of this...
[1 reply] : The error is most likely with this line: [code firstline=38] if (heap ... (by Smac89)
Reading from txt file into vector then sorting numerically.
 
03 Ribena 7 2.20 17 Coffee 76 1.50 24 Tea 21 1.10 39 Sprite 3 1.70 56 Cola 18 1.70 68 Orange 106 2.20 77 Lime 11 2.10 86 Grape 34 ...
[no replies]
by coder1
Competitive Programming
 
Hello, what are the fields of work in computer science that are most related to competitive programming. I mean the fields that need similar problem solving ski...
[2 replies] Last: I mean something like ACM-ICPC and IOI (by coder1)
Confusing error in pointer program
 
Hello, everyone! I'm new here and I'm hoping for some help. I'm in a C++ programming class and my program is giving me trouble. I'd very much appreciate some in...
[7 replies] Last: I'm not sure how exactly to update the size at the end of the functio... (by dhayden)
November 2014 Pages: 1... 678910... 32
  Archived months: [oct2014] [dec2014]

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