General C++ Programming - June 2017 (Page 8)

by TheArk
program exits
 
Hello, any idea why the program closes before allowing me to input? Doesn't let me input a thing, no...
[2 replies] Last: cout << if (weight weight <= 5) weight *= a; I don’t t... (by Enoizat)
What is wrong with my calculation? (Math vector problem)
 
I'm following along with a book I'm reading, though I've decided to implement my own Vector2D struct...
[2 replies] Last: > on lines 8 and 9 you calculate the same thing twice - maybe just cal... (by ne555)
Array indexing or index array-ing
 
In the code snippet below, line 7 is standard ... but why on earth does line 8 work? #include <i...
[2 replies] Last: That's great, @Peter87! (And thanks for re-editing.) With your pointe... (by lastchance)
'var' in class does not name a type
 
Hello, I'm trying to find out why this fails. I have searched internet without getting any useful in...
[4 replies] Last: At last, I found the solution. The correct code in the cpp file was: ... (by coredumped)
Conway's Game of Life with SFML
 
So I have to code Conway's game of life using QT and SFML. I have a text version of the game and hav...
[1 reply] : Have you looked at this stuff? https://www.sfml-dev.org/tutorials/2.0/... (by kbw)
by TheArk
else/if
 
The Question I have is: Write an if/else statement that adds 1 to the variable minors if the var...
[3 replies] Last: It worked, thanks! Gets frustrating sometimes but I love it (by TheArk)
by Kalcor
Weird post/pre increment equation
 
Why does this equation output a 5? n = 1; int n2 = ++n + --n - ++n; doesnt differ if i cout it ...
[1 reply] : I expect it to output... Your assumption is that that the side effec... (by mbozzi)
Find Max element in vector
 
Hi everyone How we can find max elements in vector?
[1 reply] : http://en.cppreference.com/w/cpp/algorithm/max_element (by gunnerfunner)
Skip char when reading
 
Hi everyone, I have a 2 part question: 1) When reading from a file or anything for that matter, wha...
[4 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <s... (by lastchance)
Game help...
 
Okie dokie so I want to create a time management game. However, I'm not even sure where to start. I ...
[4 replies] Last: You don't need a graphic interface to do this, you can use the termina... (by alex067)
Class Design: Multiple Classes in one File
 
Is it good style to use more than one class in a single file? E.g. there is a file calculator.c...
[1 reply] : > there is a file calculator.cpp and there is a class calc_addition an... (by JLBorges)
How To Create Your Own Programming Language?
 
I am wondering how I would create my own programming language using C++? I am still learning C++ and...
[3 replies] Last: http://www.wikihow.com/Create-a-Programming-Language (by closed account E0p9LyTq)
Trouble implementing the equivalent of boost::mpl::or_
 
Hi, As an exercise, I am trying to implement boost::mpl::or_ calling it logical_or. I have suceeded...
[no replies]
Console Game Project Help
 
So as a first timer C++ programmer I am trying to make a small game project to better my skills. I w...
[3 replies] Last: Line 10: Globals should be avoided. Line 77,128: The while stateme... (by AbstractionAnon)
by DTM256
Making the PC Speaker beep
 
Does anybody remember how to make the default PC speaker to beep? I'm not looking for a library, I'm...
[6 replies] Last: oh, that's doable, but significantly more work. you can just cheat an... (by jonnin)
by lo2
Weird problem with matrix structure of points of pointers
 
So I have written this method making use of double** structures, being used for storing values in a ...
[16 replies] Last: for your post 2 back.. you cannot mix new and malloc and free and del... (by jonnin)
How would I populate a vector with mp3 files?
 
Is there a way to push back mp3 files in a vector?
[2 replies] Last: What exactly is it that you want to push to the vector? The names of ... (by MikeyBoy)
Can someone explain this function for me please?
 
I'm reading a book about steering behaviours, I've come across this function but I can't understand ...
[5 replies] Last: Okay, I understand how this works now, thanks guys. :) (by Chris Longwood)
June 2017 Pages: 1... 67891011
  Archived months: [may2017] [jul2017]

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