General C++ Programming - March 2019

by Jj1009
Reversi/Othello game
 
I am making a Reversi game where 2 AI's have to play against eachother. So far i have code where hum...
[1 reply] : Take a look at this: https://www.gamedev.net/articles/programming/arti... (by dudeawsomeness1)
How to Store different classes in one array or...
 
I'm not sure if I phrased the question right, but I'm looking to iterate through an array of similar...
[2 replies] Last: Thanks! Seems to be exactly what I was looking for. (by Reiiign)
by Muiz
Having problem designing a constructor
 
Hello.. I am making a game called Ultimate Tic-Tac-Toe in which i have taken 2 classes.. 1 for smal...
[6 replies] Last: Okay sorry for being rude (by Hammad Ali)
Adding Decimal problem C++
 
With my code at the moment it is suppose to repeat Assignment # each 10 times and Project # each twi...
[1 reply] : > that when I enter a decimal as a answer, my code then begins to scra... (by JLBorges)
rounding problem C++
 
For my C++ class we are trying to create a grade projector but the part I am stuck on is the enterin...
[2 replies] Last: There is nothing wrong with your loops. The only issue here is that ev... (by Hammad Ali)
sorting class member
 
i had a question, i'm using class with 3 private vector member, i want sort based on third member. ...
[4 replies] Last: thanks, JLBorges... i done ... although many i dint learnt before... (by blacksjacks)
Use setprecision to save number to variable
 
I'm trying to compare two numbers to each other, but only to a certain decimal point. For instance...
[2 replies] Last: @mbozzi Great idea, I don't know why I didn't think of that. Thank you... (by Crusher21)
Rand() giving very similar output each iteration
 
I'm trying to use rand() to create pseudo-random numbers between 0 and 1 inclusively. I have the fol...
[11 replies] Last: VS2017 DOES have an up-to-date C++17/C++latest compiler. It defaults ... (by Furry Guy)
Need help determining the winner of this game
 
Okay so, I have the program working using vectors, but I can't seem to figure out how to make a winn...
[1 reply] : nvm I didn't have system("pause) doi (by PistolPete10)
by PacR
Find multiple char sequences in char array.
 
Hello im trying to make a program to find names inside char array, but i get 4 errors: error: canno...
[7 replies] Last: Thank you all for your answers i'm currently studying them, will mark ... (by PacR)
sort 2D string vector by selected column
 
Hi all, I am trying to sort my 2D vector by a selected column. My 2D string vector: a Wed Feb 13 07...
[4 replies] Last: It worked. Thank you very much! (by poopcupine)
by medosz
Can I have some help please?
 
I am trying to write a program but it is not working. This is the exercise that I should write. I am...
[9 replies] Last: I've done the program as you suggested. The calculation is still inva... (by medosz)
How to solve this question?
 
Victor and Francis are looking to buy a house in a new development.After looking at the several of m...
[6 replies] Last: I just know some basics commands only. #include<iostream> #include<io... (by Leewj9559)
help me please
 
This program is supposed to make an integer greater than 0 and less than 4000 put into roman numeral...
[1 reply] : … 300 is >= 100, num = 300/100 = 3 ynum = 300%100 = 0 switch, writ... (by jonnin)
Code not entering if statement block
 
#include <iostream> #include <fstream> #include <sstream> using namespace std; #include "Shape.h...
[1 reply] : watch your variables in a debugger "circle,3.5\nsquare,3" the input... (by ne555)
Saving objects to binary file with some caveats?
 
I have a project in my programming class that involves saving an object to a binary file. The class ...
[8 replies] Last: You could write the data to a buffer and then write it to the file in ... (by dhayden)
Need help with this program. Very Confused.
 
Hi, Can someone please help me with this program? Create a group of classes that will be derived f...
[2 replies] Last: I'm really just not sure how to set these up. My professor didn't give... (by Refritos24)
Address of std::set content
 
Hi, i'm using a set to make a symbol table which is shared for usage between different classes. Ca...
[2 replies] Last: thanks a lot! (by barnack)
by JonK
Beginner C++ Student
 
I get the must return a value error for the following code and can't figure out how exactly to call ...
[4 replies] Last: Ahh ok I will keep the code formatting in posts in mind thank you. New... (by JonK)
C++ HELP
 
For my C++ class my teacher wanted us to create a dividing calculator, that we would use the define ...
[2 replies] Last: here, I would have used an enum most likely. (Why: these look like th... (by jonnin)
March 2019 Pages: 123... 9
  Archived months: [feb2019] [apr2019]

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