Beginners - October 2019 (Page 3)

Baseball Random Generator Project
 
Hi, my teacher wants me to have a function that will handle the generation of the required random values. The code works but I don't know exactly what he is tal...
[2 replies] Last: Thank you jonnin for helping. I did change the headers, but I had to k... (by VincentZero)
Triangle Program
 
I have this program, and I haven't had adequate time to work on it. Not making excuses, but I've had a ton of HW in other courses that I assumed this program wo...
[4 replies] Last: Hello CodeNovice01, After loading the program into my IDE, VS2017, I ... (by Handy Andy)
Re: homework assignment
 
Good day guys I am new here hoping to get extra help, I received this assignment for class and i was wondering if someone could elp me write it. Write your...
[1 reply] : We are all here to help, but you need to start with something. We won... (by dhayden)
SIMD: more generic shuffle function
 
I think the SIMD shuffle fucntion is not real shuffle for int32_t case the left and right part would be shuffled separately. I want a real shuffle function a...
[no replies]
Need help printing out correct answer
 
What I have to do is, if there's at least more than 3 pairs that are close to each other for example G1 G2 G3 (once they're sorted) they get printed in order. T...
[4 replies] Last: Hello DdavidDLT, I did manage to put something together to run the co... (by Handy Andy)
SIMD: implement _mm256_i8gather, _mm256_i16gather
 
I want to ask a question about SIMD. Intel doesn't offer gather functions like: _mm256_i8gather_epi8, _mm256_i16gather_epi16. They should simply do the samil...
[no replies]
Stupid questions about data structures
 
I am trying to learn more about data structures, and i am wondering are hash tables the only type of tables or are there other types. The only thing I seem to f...
[5 replies] Last: When talking about algorithms, an additional constraint, most of the... (by Ganado)
stoi makes abort has been called error
 
Hi. I can't understand debug errors so. I wrote a beep sounds loader from file. I don't want use mp3 or wavs beacuse they have big file sizes. I tried to create...
[1 reply] : i fixed it by changin position of int muzik_kaydiint = stoi(muzik_kayd... (by ASingleGameEngineDevelop)
How to fix memory leak?
 
The program runs and has no errors, except for a memory leak. I thought I deleted all the dynamic memory blocks but I can't see where I'm missing the deletes. A...
[2 replies] Last: for (int count=0; count<numTigers; count++) { delete tigers ; //d... (by salem c)
Random Character Program Assignment!
 
You must follow these requirements exactly. Your program must loop, asking for character names that may contain spaces, until the word "quit" is entered. Each...
[7 replies] Last: Hello bethmayweather, For something to work with I created the vector... (by Handy Andy)
by obeeey
How to print only duplicates in an array
 
Hi, I want to print only those elements of an array which were repeated. This is my code: int main() { int val; int* tab = NULL; int n; cout...
[3 replies] Last: A map is also called an associative array, and it is an associative ... (by Duthomhas)
do...while loop not behaving
 
I promise I searched for the answer to this on my own, but I'm just having no luck. This is an assignment for school. It's supposed to continue looping and add...
[5 replies] Last: do { cout << "Enter the person's age: ";... (by Repeater)
IF question
 
Would this work with an IF statement? if(a+b !> c) {}
[1 reply] : No. The list of available operators in C++ is at https://en.cpprefere... (by lastchance)
>> operator in C++
 
Hello, What is this and why do we use it in our code? void MergeSortHelper(int arr , int lo, int hi) { int mid; if (lo < hi) { mid = (lo + hi) >> 1 ; ...
[2 replies] Last: Used in this context it shifts all the bits of the binary representati... (by lastchance)
Getting base class member data
 
I am having quite a lot of difficulty with the getting the base class data in an inherited class. There are two inherited classes, but for brevity I will only i...
[4 replies] Last: Your model seems odd. Is a student's name different to their name as a... (by Repeater)
greatest common divisor is a prime number (pairs of numbers problem in C)
 
I have to build a program in C who reads a n integer number and n pairs of 2 integers numbers.The program should display those pairs of numbers I read whose gre...
[1 reply] : It is unclear what you are asking. you maybe are asking how to loop n... (by jonnin)
Avl tree deletion
 
So I got this code from "geeks for geeks". I made some changes in main so that the data is user-defined. But it's not balancing the tree after deletion. For e.g...
[3 replies] Last: I'm embarassed. Line 308 is wrong. deleteNode(root, z); should be ... (by lastchance)
string permutation using recursion
 
i'm learning about recursion, but when i debug this code, it produce segmentation fault (core dump), what is wrong with the code? #include <bits/stdc++....
[1 reply] : Compile with warnings: g++ -Wall -g -D DEBUG -std=c++14 -c foo.cxx fo... (by dhayden)
by lexa19
Pass a string vector index as parameter
 
Hi! I have tried to pass an index of a string vector as parameter and haven't found anything on the internet useful. I am trying to implement a DFA and I want...
[4 replies] Last: Thx:) (by lexa19)
sizeof Class: why larger than all attributes?
 
class DataBlock_Offsets { private: uint32_t sma_offset; uint32_t data_offset; uint32_t string_offset = 0; uint32_t dict_offset = 0; } template<size_t...
[1 reply] : You forgot to post EncodingType. For DataBlock it is easy to answer. ... (by Thomas Huxhorn)
October 2019 Pages: 12345... 18
  Archived months: [sep2019] [nov2019]

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