Beginners - April 2020

Logarithms
Hi guys, so I'm studying time complexities of algorithms, I'm having some confusion with logarithms. I understand what a logarithm is, let's say 2^3 = 8, ...
Apr 30, 2020 at 8:15pm
[11 replies] Last: very true thanks Jonnin :) (by adam2016)
Help with logic in game..
I have a map Texture loaded and drawed, what is the best way to place the pacman sprite animation inside it (which I know how..), and to make it move only in th...
Apr 30, 2020 at 5:04pm
[3 replies] Last: another suggestion to use rails with nodes that the sprite is followin... (by ronenp88)
Find Max & min value of input stream without arrays and vectors
Dear programmers, I need to find Max & min value of input stream without arrays and vectors
Apr 30, 2020 at 4:23pm
[1 reply] : Easy peasy, store the first value retrieved as both min and max. Comp... (by deleted account xyzzy)
Loop for fraction matrix
Hey. How do I modify these codes: void generateMatrix(vector <vector<double> > &m){ cout << "Introduce the values of the matrix by rows and column...
Apr 30, 2020 at 3:09pm
[6 replies] Last: You can port leeMatriz and escribeMatriz if you create << and >> opera... (by dhayden)
What shoule be written in program in launch.json?
I would like to debug in visual code. but I don't know what to write in program of launch.json properly. When I clicked run, nothing shows in the debug console....
Apr 30, 2020 at 2:59pm
[2 replies] Last: Thank you so much for your reply! I have figured out how to construct ... (by Leen0093)
by Chad9
even numbers
Write a program that calculates the product of even natural numbers in a given range [n1, n2] - n1 and n2 to enter. Hint: if an even value is entered for n1, t...
Apr 30, 2020 at 1:44pm
[2 replies] Last: First let's figure out how to get and printout all the even numbers be... (by deleted account xyzzy)
help me with program logic
From a rectangular sheet of paper tartan (N rows, M columns) have removed some of the cells. How many pieces fall apart the rest of the sheet? Two cells do not ...
Apr 30, 2020 at 1:40pm
[11 replies] Last: I like that input format. For the OP, here is the result I get: . . .... (by dhayden)
Reducing the size and increasing efficiency of a huge block of code
So I am currently really confused. I have this HUGE block of code for the game Blackjack and have a few requirements. 1. Reduce the size and increase efficie...
Apr 30, 2020 at 1:09pm
[2 replies] Last: agree, do over. also figure out what you need. you need the ability ... (by jonnin)
Game of Life, Determining Next Gen Help / Question (1,2)
I am currently working on a Game of Life Program for my C++ class and had a bit of an issue, I am trying to update and generate new grids for the next generatio...
Apr 30, 2020 at 6:16am
[22 replies] Last: Have a good nights sleep I appreciate you! (by Depressed)
ascii /unicode
how do i insert ascii characters to the code :) . cout << "***************************************"<<endl; cout << " \263a GOOD BYE!!!\a ...
Apr 30, 2020 at 5:45am
[8 replies] Last: thank you everyone it was very helpful :) (by GOdliike123)
File won't open
I'm making a code that takes a file with a list of heights, first and last names of people and then puts them in order. This code isn't fully complete yet, I wa...
Apr 29, 2020 at 10:46pm
[2 replies] Last: Hello raisetheroof00, Looking at the whole program. include <iostr... (by Handy Andy)
execute another program from a... program
Let's say a I have a compiled a code in linux and the result is a.out. Can i write some code that at some point calls ./a.out -t smth? int x = 0; x = ./a.out...
Apr 29, 2020 at 9:03pm
[1 reply] : This will have the information you likely are looking for: https://st... (by zapshe)
how fix this error
i want send a class to a function class cars{ protected: string a_marke,a_modelis; int var_turis,maks_grietis; public: cars(string am="",string a...
Apr 29, 2020 at 7:31pm
[6 replies] Last: thanks for help (by kryganas)
Tmemo problem
Hi I have a program, where i want to write "notes" into a TMemo field, to show the status of subrutins that have been run. However, my program Freezes, when ...
Apr 29, 2020 at 5:53pm
[4 replies] Last: THX.... Works, if i do it like this... :) void xx(); TMemo->Lines->B... (by PAS2020)
Not showing maximum or minimum
Hello all, I am doing a tiger eating problem in which I put the amount of food over 7 days for 3 tigers. I then Have to get maximum, minimum average. I run ...
Apr 29, 2020 at 5:27pm
[7 replies] Last: The error is that you need to actually read the return value from the ... (by MikeyBoy)
Game of Life NeighborCount help
I am quite stuck on trying to figure out how to write my code for counting neighbors in this Game of Life program I am attempting to write. Requirements are as...
Apr 29, 2020 at 4:18pm
[2 replies] Last: I could not think of how to begin the code, I had a general idea of ho... (by Depressed)
Why do I get memory violations from passing an array by reference to a function to input data using pointers?
Hello, I have written a function to accept user input of elements for a size of array, defined by user input. When I pass the address of the newly created a...
Apr 29, 2020 at 4:13pm
[5 replies] Last: While that is true, x was already a pointer before being passed to a... (by Ganado)
getline error
Hi, I'm writing a program that allows me to read a text. Now it doesn't do any of this because I'm stuck at "getline" an error ( no matching function for call...
Apr 29, 2020 at 4:05pm
[9 replies] Last: Check if your file is being opened correctly. std::ifstream in(take... (by Ganado)
Is there an alternative way to calculate Standard Deviation using pointers?
Hello, I have written the following code to dynamically allocate some elements to a dynamic array, then to compute the standard deviation from the elements. ...
Apr 29, 2020 at 3:43pm
[1 reply] : If you can use std:vectors instead of dynamic arrays. Less overhead... (by deleted account xyzzy)
by Chad9
Determine the number of equal integers of three entered
Hello, I have to make a program which has to determine how many of the 3 entered numbers are equal. The program outputs one of the numbers: 3 (if all numbers ar...
Apr 29, 2020 at 3:06pm
[5 replies] Last: Hello Chad9, Sorry I was delayed for awhile. Taking into account eve... (by Handy Andy)
April 2020 Pages: 123... 20
  Archived months: [mar2020] [may2020]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.