General C++ Programming - July 2015 (Page 12)

by gucri
C++ programme
 
I can not understand where is the error. "Leggere da tastiera un vettore di n numeri, controllare se tra i numeri inseriti ci sono multipli di 3 e nel caso sta...
[1 reply] : your codde, indented #include <iostream> using namespace std; int mai... (by ne555)
algorithms
 
The problem is that I have n products each product has a price and a rating(there is no relation between price and rating)and have a budget say K.I have to bu...
[8 replies] Last: Repeat the steps with all possible combinations (downward) until you h... (by coder777)
by Ceset
Strings, Localization, Unicode and UTF
 
Hi We store chars and strings which is easy. But when it comes to localization, unicode, UTF, and strings. It is not that easy. From a programmers perspective...
[2 replies] Last: It would take a lot of time to completedly learn all those i guess. (by Ceset)
True random number generator
 
Hi! On June 2015, we've unexpected discovered, that it is possible to generate true random numbers using only software. Can you help us? a) Explain in ...
[19 replies] Last: helios 3. Although not explicitly stated here, all addresses are al... (by ncomputersorg)
by cGuru
Calculate Dynamic Increment For An Allotted Timeframe
 
I am running at 30 frames per second. I need to increase an x coordinate from 0 to 750 in 0.5 seconds. I could do this by dividing 750/15=50; So, increase the ...
[1 reply] : Nevermind. Forget using a timer when counting frames is 10 times easie... (by cGuru)
Caeser Cipher Program. Help wanted.
 
So I have basically learnt this for fun on youtube, and for the most part I can understand what the guy had done, but there are some things I do not quite get. ...
[4 replies] Last: http://www.cplusplus.com/doc/tutorial/arrays/ (by closed account 48T7M4Gy)
by Beezy
Student Grading Program Help
 
This is a simple program designed to output the grade a student earned by inputting score. My only problem is "Molly (case sensitive) is the teacher's special f...
[5 replies] Last: As a quick thought without checking you have to change Molly's score b... (by closed account 48T7M4Gy)
C++ Function help please !!!
 
Create a very simple larger( ) function that takes 2 positive numbers as parameters and returns the larger value of the two numbers. Create a simple larger...
[2 replies] Last: thank you (by pepsiytw)
level order traversal
 
So I'm trying to implement level order traversal for a binary tree off the top of my head. I feel like I am missing a return statement but is it absolutely nece...
[4 replies] Last: Awesome that clears up everything. Thanks MiiNiPaa (by cppnoob25)
Suggestions on how best to design this, please.
 
class CompositeLocationBase : virtual public Location { // All functions pure virtual. }; template <int N> class CompositeLocation : public CompositeLoca...
[1 reply] : You can add undergroundFloors member. Then locations will actuall... (by MiiNiPaa)
Struct Definition
 
In the tutorial on Structs it says the following: struct product { int weight; double price; } apple, banana, melon; In this case, where object_names are...
[1 reply] : how would I, or anyone reading the code, know that this is a struct o... (by MiiNiPaa)
cant find the error
 
i am not able to understand the compilation error. #include<iostream> using namespace std; class A { protected: int a,b; ...
[2 replies] Last: B derives from A . Therefore, B must know how to construct that ... (by MikeyBoy)
What are the limits of console applications?
 
What are the limits of console applications? What can I do with them? What can't I do with them? What should I learn next after learning the basics of progra...
[3 replies] Last: What are the limits of console applications? Lower bound and upper b... (by closed account 48T7M4Gy)
by Ganado
(non-standard?) constexpr standard library functions
 
I can't really find good information related to where the standard library uses constexpr functions. To my surprise, something like this compiled, even thoug...
[3 replies] Last: > So how do I know whether a function in the standard library is const... (by JLBorges)
Why does Visual studio 2015 keep crashing my display driver?
 
I searched through google for a solution but i can't seem to find it. I am trying to draw a triangle with direct3d 11 but every time i compile the code, my disp...
[no replies]
Using STL's sort function for the 'list' class
 
Before I ask my question, I apologize for the crude outlook of my program; I tried to use the code tags on here, but, for some inconceivable reason, they would ...
[4 replies] Last: Hmm..., let's see Zhuge ; you may have a point there! Let me go and e... (by ravanelli)
file handling
 
Pleas guide me about file handling.......
[1 reply] : #include <fstream> // write data std::ofstream output("test.txt"); ... (by Gamer2015)
by sacin
dont display what i have typed
 
i want to make a program which displays some other letter if something is typed. for example: in the output screen if someone types:"a" i want some other let...
[no replies]
Best class design for game with player moving in a room?
 
I am trying do implement a player walking inside a room with specific boundaries. However, I dont know how to best specify the class relationships and their res...
[4 replies] Last: Well, whatever, there is no "best design" anyway, just personal prefer... (by Gamer2015)
linkedsa list
 
void HighestLowest() { node *cur; cur = head; double lowestvalue,highestvalue; highestvalue = lowestvalue = cur->number; //set the high&low to ...
[12 replies] Last: Indenting correctly would help!!! I would be rather more inclined to h... (by andywestken)
July 2015 Pages: 1... 101112131415
  Archived months: [jun2015] [aug2015]

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