Beginners - January 2021 (Page 4)

by Ulik
Help me write this code
 
Write a C++ given 2D array of integers X . Fill in elements by random() in interval [-12…33]. Find sum of even and sum of odd elements.
[4 replies] Last: As a starter, to produce random numbers in the required range: #inc... (by seeplus)
problem with struct/array
 
Write your question here. hello! i'm having troubbles with a uni project: need to creat a program that inserts and removes elents from a list struct/array. my p...
[4 replies] Last: Andy thank you very much for your help. As a beguinner in programming... (by Artur Gouveia)
Please Help
 
Good morning, I am working on a project for school and it has stumped me. Would anyone be able to help me out with this issue I am having? Basically the firs...
[2 replies] Last: Also, when you copy/paste code remember to change as required! genre o... (by seeplus)
Convert .txt file into a 2D float matrix?
 
hello, I am a beginner i C++. I have been passing for some troubles here, my code gets the warning of exceeds/analysis stacksize, the error C6262 in visual stud...
[7 replies] Last: Thank you Furry Guy. (by DanielDeChamps)
by hbcpp
Working with threads
 
Hello Everybody! I want to create an application which will create(dynamically) n number of threads for a set of tasks . When one thread finishes its task i...
[1 reply] : So one of these? https://en.wikipedia.org/wiki/Thread_pool (by salem c)
by Mif
Need help with structs ?
 
Hello again.. I have defined these 2 struct, and when I try to compile it gives me two errors, of course it is the same error: ||=== Build: Debug in D2LoDRun...
[16 replies] Last: Yup.. I was learning right after C , windows programing and actually ... (by Mif)
by medosz
2d array with range-based for statement
 
I am trying to set each of the element to zero in the 2 dimension array with a nested range-based for statement. I am missing something because it does not set ...
[5 replies] Last: Well with the code you posted you really should be using initializatio... (by jlb)
by Sevvy
Infinity Loop. What am I doing wrong here?
 
Hello, new to programming. Watching videos while I create stuff to try and improve. So, here's my issue. When selecting New game, continue, and quit... everythi...
[5 replies] Last: Hey guys, first off, I wanted to say thank you for the help and suppor... (by Sevvy)
why const references are the exception that they allow apparent indirect access to a literal?
 
Why would I use a reference that refers to a constant literal? what I understood that this is used to extend the lifetime of the literal, why would I extend it...
[no replies]
methods overloading
 
Evening everyone, need your help with the following task: I have to write overloading methods that will do ( strcpy, strlen, strcat, strstr, strchr, strcmp) fo...
[5 replies] Last: @seeplus, I have to provide my own versions of cstring functions, men... (by MaxGreen)
New to templates
 
Write your question here. Can you please tell me what I'm doing wrong here? #include <iostream> using namespace std; template <class T> T max (T x, T y) { ...
[4 replies] Last: Thanks Repeater) (by snoisia)
Primary-expression error
 
It shows error "expected primary-expression before ',' token" on line 10. I ran out of ideas how to fix it..... #include <string> using namespace std; cla...
[3 replies] Last: Also when passing string to a function, you'd usually pass as const st... (by seeplus)
by medosz
Assigning value to 2d array
 
What statement should I use to set the values in the first row and the second column to zero in this 2-by-3 array? #include <iostream> #include <array> using...
[3 replies] Last: Hello medosz, To go along with what keskiverto has said consider th... (by Handy Andy)
Error on operator overload
 
I tried a tutorial about operator overload On line 16 (nComplex sum;), I had the following error: no matching function for call to 'nComplex::nComplex()' ...
[3 replies] Last: It's working now. Thank you so much (by popcornman)
by siid14
Taqueria Record Sale Program (Struct issue?)
 
I'm training myself via a programming problem about a taqueria (burrito) sale. My issue is that the code is perfectly running but it does not print me the tota...
[1 reply] : salesRecord *taqueriaRecord = new salesRecord ; //ask user n... (by salem c)
Check my code, please!
 
I have a C2106 problem in '' sum = a / b + = a / b; '' here is how to solve it? { int a, b; int sum; for (a = 1; a < 11; a++) { for (b = 2; b ...
[2 replies] Last: Thanks for the help! Everything works as it should! (by chebyrek)
RVO?
 
Hi, since i started reading up on c++ i was taught to return from functions by reference to save on temps being made. I read that this is a time saver. But now...
[7 replies] Last: That too ^^. Its gotten very rare to need to second guess the compil... (by jonnin)
calculate the difference between two time periods
 
how to calculate the difference between the departure and arrival times of a plane entered from the console? in my task it is said to display data on aircraf...
[5 replies] Last: struct hm_time { int hours = 0 ; int minutes = 0 ; stati... (by JLBorges)
How do I compare a user input to items stored in an array
 
In this lab task, you have to create a program which simulates the process of Aruba Vending Machine placed in PAF-IAST Main block. First, set/initialize both c...
[5 replies] Last: Hello usedlube69, You say "is it fine now?". Does that mean it is wor... (by Handy Andy)
by yem
Graphs (1,2)
 
Hi, Visual Studio seems to be telling me that the iterator it is const (and therefor not letting me return it) although I can't seem to figure out why? Anyone...
[22 replies] Last: dhayden I actually did it based on your method in the end. https://g... (by yem)
January 2021 Pages: 123456... 11
  Archived months: [dec2020] [feb2021]

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