Beginners (Page 6)

for if loop
 
I dont understad why this code does not work, it doesnt go through loop, but just prints out 1111 al...
[2 replies] Last: (x = a) should be (x == a) == is used for comparison whereas = is ... (by Grime)
Yet Another Problem About Sequences
 
For a set of positive integers S, let's define gcd(S) as the greatest integer which divides each ele...
[4 replies] Last: @dutch maxdaen is right. It will not work. Maximum value of a will re... (by honeybuzz)
by dangtu
What is a good rule to organize C++ code?
 
I wonder is there any rules to help organize our source code? For example, I'm having some header fi...
[3 replies] Last: This is of course a problem: #ifndef NAMED_NODE_MAP_H #define NAMED_NO... (by coder777)
by Grime
sizeof(pointer)
 
I use VS2017 on a 64-bit Windows 10 system. sizeof(*int) tells me 4bytes. But you need 8 bytes to...
[3 replies] Last: int* foo; int bar; cout << sizeof(foo) << '\n' << ... (by Grime)
How to check in character?
 
Hi... This program check numbers that is palindrome or not in reverse order i want to make this prog...
[7 replies] Last: Thanks Grime and honeybuzz (by Mehmood Umer)
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 d...
[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 TestCase...
[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...
[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 functi...
[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? I...
[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 ...
[10 replies] Last: Yep, and Cubbi's example solidifies that absolutely, it looks like. I ... (by Ganado)
by Repo
Chef and Modulo Game Problem
 
Chef is playing a game with two of his friends. In this game, each player chooses an integer between...
[8 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 visua...
[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 f...
[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....
[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 progra...
[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 creat...
[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 obj...
[5 replies] Last: I agree with salem c , consider it might be you that is misinterpreti... (by TheIdeasMan)
Pages: 1... 45678... 30
  Archived months: [nov2018]

Cannot post in this page. To post a new message, go to the first page.