Beginners - January 2022 (Page 2)

Need advice - Kadane's algorithm vs Recursion method
 
My Question - how should I learn more effectively? 1) just learn the most effective/simpler way of ...
[6 replies] Last: thanks Jonin, well written and your explanation is helping me progress... (by memepapa)
error: no type named 'cout' in namespace 'std'
 
I must have introduced some error that I can't pinpoint been writing using std::cout; instead o...
[11 replies] Last: thanks for expanding on this discussion, I'm learning from your exchan... (by memepapa)
by limwn
How to search in struct in c?
 
Hi, I learned struct recently, however, I don't know how to search something in struct. Here's my a...
[2 replies] Last: exact string searching is painful to the user. the caps/lower letters... (by jonnin)
Find element in priority queue
 
I was just wondering...How do you find an element in a priority queue if you only know its value wit...
[4 replies] Last: @seeplus It's just a problem on our online judge which I wanted to sol... (by Highground7490)
How to combine/sort text from an email and a .txt doc
 
Hello. For part of my job, I receive emails with rows of numbers (PM's) that look like this: ...
[11 replies] Last: Here's my best progress so far #include <iostream> //#include <strin... (by the other jorge)
by alexas
Advice for data container / structure
 
Hello I have some sort of branched data structure, see the image: https://ibb.co/TPMMfYb Basica...
[14 replies] Last: @kbw: without further information, I think your first post is the best... (by newbieg)
Split 3D into 1D vector
 
If I have a 3D cube of a given dimension, say 50x50x50, and I want to split it into smaller cubes of...
[2 replies] Last: Thank you very much (by ragnarokas)
Is this the correct way to get an "user" directory
 
I'm still new at VC++ and wondering if this is the best way to get the current user directory in win...
[6 replies] Last: Have a look at SHGetKnownFolder https://docs.microsoft.com/en-us/windo... (by seeplus)
How to clear the input stream when given two inputs
 
When I enter 2 letters (such as b c) as the coordinates to check if the program outputs an error mes...
[1 reply] : #include <iostream> #include <utility> #include <string> #include <re... (by JLBorges)
by Hcarr2
assigning variables
 
"If the input is: 611408 Then, Leo would have eaten 6 pounds of meat and 11 bones. Una would have e...
[5 replies] Last: #include <iostream> #include <string> using namespace std; int main(... (by lastchance)
unordered_set<int> s( argument1, argument2 );
 
I'm trying to find more documentation related to this code unordered_set<int> s(nums.begin(),nums...
[2 replies] Last: s will contain the unique elements added from nums. If the size of s i... (by seeplus)
File write problem
 
I am not using any "/n" or "endl" then also my file stores the data every time in a newline. I don't...
[2 replies] Last: THANKYOU @salem c (by pilot1909)
How to convert this txt file to an table output
 
I have a "New.txt" file with this data in it : userchoice_for_vehicle,vehicle_No,manfacture,in_tim...
[9 replies] Last: As an extension, this will read the file, display the data and then re... (by seeplus)
Execute section of code only once
 
I am attaching a toggle switch to an servo motor. I want the servo to rotate from 0 to 90 and back t...
[11 replies] Last: A toggle switch turns power on or off and does not automatically retur... (by againtry)
when use object replace smart pointer as member in class
 
such as the below code, EmbedderEngine has some members, what question I asked is when using a raw o...
[1 reply] : > using a raw object as a member and when using a smart pointer as a m... (by JLBorges)
Time display format
 
I want my time to print only in hh:mm:ss format ... I don't want date and year #include<iostream>...
[4 replies] Last: The format returned from ctime() is fixed (www mmm dd hh:mm:ss yyyy). ... (by seeplus)
C++ 20 full features
 
Dear experts, I will like to inquire about anyone having any idea when will the full features of C+...
[16 replies] Last: There are more BB Code tags usable here, not just code tags. See 2nd ... (by deleted account xyzzy)
Can't stop my character to fly around when jumping
 
Hello ! I'm creating a game as a project for my Bachelor's Degree using the SDL lib and a simple im...
[9 replies] Last: Simply, there are 3 basic equations: v = u + at s = ut + (1/2)a(t^2) ... (by seeplus)
How to use a non-const int to assign array size?
 
This is purely a conceptual question. I am aware I can use dynamic containers like std::vector, but ...
[10 replies] Last: The reason I want to stick to statically sized arrays is because they... (by mbozzi)
main within class?
 
Was looking for supplementary video tutorials to understand recursion and this is one that I couldn'...
[5 replies] Last: Learn C++ on "Recursion": https://www.learncpp.com/cpp-tutorial/recur... (by deleted account xyzzy)
January 2022 Pages: 1234... 6
  Archived months: [dec2021] [feb2022]

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