Beginners - March 2021 (Page 10)

by Ch1156
Best way to write a save system?
 
So I want to write a save system for my game but im unsure how to approach it design wise. Should I create a save and load class? should each class like player,...
[8 replies] Last: > You should stick to non-member non-friend functions if possible But... (by mbozzi)
deque push_front, how it actually works?
 
Hi, I am learning about deques and their operations, and on push_front() and I am pretty sure I know how it works but just want to make 100% sure. So i learn...
[2 replies] Last: While not a complete answer directly, more generally it should be said... (by Niccolo)
by alexas
find the center of the rotated cube c++/glm
 
I have a cube and I need to find its center after the rotation has been applied. So as you can see, my idea is to find the center point of that figure, and rota...
[3 replies] Last: Also posted here: https://stackoverflow.com/questions/66535518/find-th... (by Ganado)
Number to Letter
 
Hello, How do you write a program that prints out the alphabet out to the "nth" letter? For example, if the user inputs a 1, it will print out "a". If the u...
[3 replies] Last: #include <iostream> using namespace std; int main() { int n; ... (by lastchance)
Linked List
 
Working on inserting a node at the front of linked list. First time I ran code worked perfect but now no good. Thanks #include<iostream> using namesp...
[4 replies] Last: ah its usually something that basic that i overlook. Thanks Seeplus fo... (by robjs111)
VS 2019 C6385, array, fstream
 
Hello World! I´ve got this warning (C6385, Reading of invalid data from "sammlung": the readable size is "(unsigned int) * 48 + 4" bytes, but "96" bytes can b...
[5 replies] Last: Hello xCriminaL, To start with it is always a good idea to provide co... (by Handy Andy)
by akeilo
Need help
 
How would I rearrange this to get constant variables. I need three of them. I am using this to calculate an average of integers. Are my variables initialized co...
[5 replies] Last: I interpreted this as using symbolic constants in the place of numeric... (by booradley60)
R/C/C++ library for N-dimensional arrays
 
I'm looking for a library that is either in R or easily wrappable with R, that can do the following things: construct and subset N-dimensional arrays perfor...
[2 replies] Last: Also a edit post spammer. (by deleted account xyzzy)
sequential access / sequential containers?
 
I have been learning containers. Now learning sequenial, and it says " The data structure they implement enables a sequential access" So i want to know what thi...
[8 replies] Last: fair enough, but you can still always do random access in front to bac... (by jonnin)
Exception error
 
Hello everyone, I am getting the following exception error in visual studio Unhandled exception at 0x00007FFA834F3E49 in model.exe: Microsoft C ++ excepti...
[2 replies] Last: If the debugger isn't sufficient by itself, you may want to try Visual... (by Niccolo)
Recursion
 
I have issus with this code: How can i make it to display this condition. It has to be with recursion: 1, 2, 3, 4, 3, 2, 1  void rec(int n) { if(...
[1 reply] : #include <iostream> using namespace std; void rec( int n, int r = 1 ... (by lastchance)
Variables in while loops
 
So I'm doing an assignment where I need to take a partID and quantity from a text file and put it into a table in the command console (dealing with tax and gran...
[6 replies] Last: @domweng: * Refactoring code to functions can simplify * What if part ... (by keskiverto)
Use static in function - C
 
Hello, Why we should use "static" char of array in function? Thanks #include <stdio.h> char* binbin(unsigned n); int main() { unsigned b = 2...
[2 replies] Last: Note that you don't need () around the returned value. Return is a sta... (by seeplus)
by Ch1156
invalid min and max arguments for uniform_int
 
Im having some trouble and im unsure whats going on. So in my code i have attacks that an enemy can use, and I had it so that in main the attacks were added to ...
[4 replies] Last: I got it working, I had my enemy vector set before i set the attacks s... (by Ch1156)
by L67GS
filesystem::current_path
 
With maneuvering the filesystem relative to the working directory to enter various sub-directories I've been using a string: filesystem::current_path("Su...
[5 replies] Last: compile string for future noobs like me learning to use std::filesyste... (by L67GS)
using count() question (1,2)
 
I'm trying to use the count() to see if 2(or more) elements from row are in row . If false, then increment b and increment the counter. The rows are in a 2d...
[27 replies] Last: Here are the timing results for this method #1 of count_intersection: ... (by Brian845)
by bstroe
Maximum submatrix
 
We have an A matrix with N rows and M columns. Find the maximum sum submatrix in the matrix. The program will display the maximum amount of a submatrix on th...
[1 reply] : I can't "repair" your code because I don't have a clue what you are do... (by lastchance)
loop a output for certain amout of times
 
I'm trying to make the code in a way so that the output "its a Yes or no question" will come out like 3 times before having a different output saying something ...
[8 replies] Last: thanks guys (by newbieguy105)
Expected primary-expression before '(' token
 
Hey, I have been trying to compile my c++ code in OpenFoam and for some reason I keep getting expected primary expression before '(' token. y_(wallDist::N...
[18 replies] Last: Actually I am using a modified version so the constructors were all wr... (by Thugfreak)
program ends unexpectedly
 
This is my code. Everytime I want to run for the 2nd or 3rd time, before i even get a chance to type in a "y" or an "n" the program ends unexpectedly. The error...
[5 replies] Last: Hello coder0101. Did a little work on your code and came up with this... (by Handy Andy)
March 2021 Pages: 1... 8910111213
  Archived months: [feb2021] [apr2021]

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