Beginners - January 2019 (Page 14)

by obeeey
Problem with reading files
 
Hi everyone, I have a task to write a program which finds specific words in a simple html file and does some other stuff with them (the file contains inside <bo...
[3 replies] Last: Help is still needed. I tried adding in function GetBodyPosition afte... (by obeeey)
Whats the difference between using -> and using . ?
 
In c++ you can do Class. and Class->. What are those, when are they used?
[4 replies] Last: Thanks all (by bretjoseph)
Extract Numbers only from read File
 
I have a text file called "testCase.txt" that looks something like this: TestCase1=1,0 TestCase2=5,8 I am currently able to read the entire file as a te...
[3 replies] Last: #include <iostream> #include <sstream> #include <string> #include <ve... (by lastchance)
Array task - rand() issue
 
Hello everyone! In this topic I would like to recieve some help from you guys with my arrays task. Namley I was asked to create two arrays, A and B with the ...
[2 replies] Last: Neither swapping sequence is correct. On line 28 you declare a variab... (by lastchance)
Different Neighours - An Interesting Matrix Problem
 
Greedy approach Now grab a paper pen and start solving
[17 replies] Last: I got 3 AC's can anyone help me with edge case, give me a hint if poss... (by closed account 17o30pDG)
Is this an appropriate use of std::function?
 
Hi I have a function F1 which gets certain data and performs operations on this data. The function gets data using one of two different functions (F2 or F3)...
[1 reply] : It depends on whether F1() should know about F2() and F3(). That aside... (by helios)
by Mrsoap
no default constructor
 
I have a reference in my superclass constructor. How would I do this in the subclass constructors? If I leave them empty I get a 'no default constructor' error....
[3 replies] Last: @Mrsoap Please don't start new topics about the same subject, just ke... (by TheIdeasMan)
by Ganado
Writing subset-of-C C++ code
 
Hi everyone, Is there a way on one or more compilers to enforce only using a C++-compatible subset of C? (Would be most interested in gcc.) e.g. int* p1 = ma...
[10 replies] Last: Yep, and Cubbi's example solidifies that absolutely, it looks like. I ... (by Ganado)
Chef and Modulo Game Problem
 
i dont think this platform is made for sharing approaches for ongoing competition problems. we could help you improve your approach if u are anywhere near.
[5 replies] Last: @Repo, If you don't understand then you should lose. Hence the word "c... (by dutch)
Dereferenced pointer input to a function
 
I'm relatively new to C++ and I have a problem that I hope you can help me solve. I'm using MS visual studio running on Windows 10 home. I have a function(Coord...
[6 replies] Last: Thank you both for your time and input. The solution proposed by ne555... (by N503838)
Need Help in Codechef Question
 
I need help in the challenge problem chef and matching in return i can help among any of the first four problems of division 1
[4 replies] Last: This guy's not even asking a question. He's asking for a alliance with... (by dutch)
by Tduck
How to get active user input?
 
When launching games, pressing the arrow key doesn't require a follow up keypress by pressing enter. It just moves me without waiting for me to press enter or ...
[3 replies] Last: https://www.onlinegdb.com/faq Any third-party library do you support? ... (by salem c)
How to pause keyboard input in C++ (cin input)
 
I have just learnt about the funciton GetKeyState() from windows.h, and I want to use it in a program but I have this problem: after I use GetKeyState() the let...
[5 replies] Last: System("pause") is a bad practice. It's platform specific as well as... (by Tduck)
by Mrsoap
Using and ObjectManager to render and update subclasses in a list
 
Hello, I'm completely new to this so if my code is completely wrong then I apologise. I am creating a simple Asteroids game engine with an ObjectManager cla...
[2 replies] Last: Do you know what the differences are between local, global and member ... (by coder777)
Structures - C++ Task
 
Task: Write the following program: 1) Define the strucutre that describes an animal. 2) Create 2 objects of the strucutre. 3) Set values to the object parameter...
[5 replies] Last: I agree with salem c , consider it might be you that is misinterpreti... (by TheIdeasMan)
How to check "is cursor visible"?
 
How to check "is cursor visible"?
[15 replies] Last: Yes, it spam "visible" when I dont see the physical cursor. So how ca... (by jacapiwsko)
by Grime
How do I get a single character from stdin?
 
How do I get a single character from the stdin? get() needs a delimiter, but I just want to extract a single character without waiting for anything.
[8 replies] Last: your standard c++ tools are waiters. That is, if you try to read fro... (by jonnin)
Shortest path from source to every other node with skip some(W) edges
 
I have read one answer on Quora (https://www.quora.com/How-do-I-find-shortest-path-with-the-ability-to-skip-some-edges ) using modified Dijkstra algorithm but c...
[1 reply] : Have you already managed implementing the plain Dijkstra algorithm or ... (by nuderobmonkey)
Function changes values when part of a for loop.
 
I made a function to help solve problem 122 on Project Euler. When I run it on just a single number such as 35, it outputs 7; however, when the function is call...
[7 replies] Last: Step through your code in a debugger. That will allow you to look at ... (by MikeyBoy)
by hellon
modulo question
 
Chef is playing a game with two of his friends. In this game, each player chooses an integer between 1 and P inclusive. Let's denote the integers chosen by Chef...
[1 reply] : And? What is your question? What code have you written? What proble... (by MikeyBoy)
January 2019 Pages: 1... 121314151617
  Archived months: [dec2018] [feb2019]

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