Beginners - June 2020 (Page 3)

[SDL] line not drawing to screen properly
 
Hi Guys, I seem to be having a problem when trying to draw a line to the screen, so the line should be from the centre of the screen pointing in the direction ...
[14 replies] Last: Just wanted to make you aware that your dot product function is return... (by Ganado)
Access Violation in C
 
Hello, I have the below error: (line 8) Exception thrown at 0x7928E63C (ucrtbased.dll) in C_1.exe: 0xC0000005: Access violation writing location 0x00BA0000. oc...
[6 replies] Last: Good to know - thanks Ganado. (by salem c)
c++ permutation
 
Hi all, I am new to c++. But worked on python. Need to convert the python code snippet to c++. How to simulate the python permutation in c++. Where can find ...
[4 replies] Last: Thanks a lot for your replies. It had really helped me a lot. (by Shruthi LS)
by mnnsa
Game theory optimised solution help
 
Given a string colors, where each character is either white or black, Wendy and Bob play a game to manipulate this string as follows: • They perform moves a...
[6 replies] Last: The point here is that due to the 2 neighbors they do not interfere ea... (by coder777)
by mnnsa
help with optimal approch
 
Given a string colors, where each character is either white or black, Wendy and Bob play a game to manipulate this string as follows: • They perform moves al...
[5 replies] Last: sure will delete it (by mnnsa)
error: bool' cannot be declared with 'explicit' specifier
 
So when i use the explicit with bool to convert a parameter i get this error : " error C2178: 'sdds::Ship::operator bool' cannot be declared with 'explicit' ...
[1 reply] : 1. The explicit keyword cannot be applied to an out-of-line definit... (by mbozzi)
Display solution in 2d vector
 
Hi everyone.. newbie here.. I seeking some advice regarding my c++ project. I got a problem in reading a solution that I copied from (populationP_shortR & popul...
[7 replies] Last: Just factoring out the functions from main is the easiest thing to d... (by sarah1993)
Help me understand Modulo Operation
 
please help me understand. why is (2 % 5) giving me the outcome 2. from what i understand is that this operator gives the rest number of a division. but when i...
[6 replies] Last: excellent thanks. i know i just wish i was a bit sooner with seeing th... (by alexander1981)
Garbage value in linked list queue program
 
Hye! In the output, I am getting garbage value! I don't know where I am making a mistake. Can anyone find the mistake? #include <iostream> using namespace s...
[2 replies] Last: Line 41: You set rear->waitingtime, but that's the old value of rear, ... (by dhayden)
Hash map
 
Hello! How would I implement this program without using the library "<unordered_map>" . Is there any alternate. I know how to make a hash table though. Thanks ...
[3 replies] Last: A the name implies, unordered_map stores items in no particular order.... (by dhayden)
Try to find element from array.
 
I try to find element from string array, but when I use find(cmemb , cmemb , c) - it brings errors C2675, C2100, C2088. Thank you for help! string cmemb ;...
[1 reply] : What you do is equivalent of: string get(string b) { string a = cmem... (by keskiverto)
Regarding Dictionary Creation
 
Hi all, I am new to c++ and I have worked on python. I have worked on the dictionary in python and What is the dictionary substitute in c++. Where can I find...
[2 replies] Last: Thank you (by Shruthi LS)
by Mif
Need help with the Menu controls..
 
Is there another way to work with Menu controls ? In my code I have a vast menu with a lots of elements(sub menu items). But the problem is, how to write less ...
[1 reply] : You might consider to use arrays or std::vector for those values which... (by coder777)
Separating a file into 2 vectors and creating a new file with the vectors
 
I am trying to take a file that has a lot of baby names for both boys and girls and numbering them based on popularity (these names are in 3 columns, column 1 =...
[3 replies] Last: To add a name to your vector just call boy_names.push_back(boy_name);... (by Thomas1965)
Dijekstra Algorithm Undirected graph
 
Hello! How would I evaluate the shorted path in the Graph by seeing the table below the graph? Graph link: https://ibb.co/Kqv8rmJ
[3 replies] Last: It's irrelevant whether it is diagonal. Which point would you like to ... (by lastchance)
Best suited graph algorithms for specific scenario
 
I have selected chosen the suitable algorithms for these situations but the question includes TO SPECIFY in terms of undirected or directed, and unweighted or w...
[no replies]
Avl Sort
 
Hye! Can anyone explain how can I use Avl tree for sorting with an example? Thanks
[1 reply] : Is google broken where you are? Just paste the meaningful words of you... (by salem c)
2 questions on undirected graph
 
Can anyone please help me solve these two question on an undirected graph(data structure)? Thanks a lot! Given a weighted, undirected graph with |V| nodes, a...
[2 replies] Last: Make yourself nice and comfortable for a long read. https://xlinux.nis... (by salem c)
Can someone explain to me this line of code?
 
I noticed my professors never taught me this. Only dedicated, passionate programmers uses this cout << ((a+b)%3 == 0 && 2*a >= b && 2*b >= a ? "YES":"NO"...
[2 replies] Last: Hello advancedip, Furry Guy's link is good and a good place for ref... (by Handy Andy)
Validating data using loops
 
Hey everyone! I've been working on a project for class, and this week I am supposed to add loops to validate data. I'm getting very confused! I need to add a ...
[5 replies] Last: Thank you Thomas for your reply! very simple solution, I don't know wh... (by JustADream)
June 2020 Pages: 12345... 12
  Archived months: [may2020] [jul2020]

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