Beginners - July 2019 (Page 3)

Uinitialized Local variable in Visual Studios ?
 
The program is supposed to work as a basic Magic 8 ball. I built it in a sandbox and made sure it worked. The only feedback there was a warning but not an error...
[4 replies] Last: and there you have just one of the many problems caused by global vari... (by jonnin)
Using ESBTL and PDB files
 
So, I'd just like to preface my post by saying that I'm a biological scientist, and I have very little experience in programming (I've done some writing in Matl...
[7 replies] Last: Thank you! Okay, I think I'm almost there. However, I'm having a pro... (by JdittoJ)
Anyone with java knowledge that can help me convert code to C++
 
Hello, Could someone help me convert this? import java.util.Scanner; public class AssignGrades { public static void main(String args) { ...
[2 replies] Last: of all the code in the world to convert, you picked this?! If you have... (by jonnin)
C++ Counting Matched Numbers help
 
I'm trying to get an output as this: Enter 6 numbers into the first array: 5 3 8 2 9 4 Enter 6 numbers into the second array: 1 4 5 2 7 6 There are 3 matched...
[12 replies] Last: Thanks for the help. (by scooter28)
by atoken
Time conversion and difference
 
So I am writing a program that is basically a time clock. It takes the date and makes that the name of the document that store the info and it takes the time yo...
[1 reply] : I would begin by suggesting you switch to std::chrono, follow some tut... (by Niccolo)
Should I be using nested classes here?
 
Hi If I want a class A to have an object of type Class B but objects of type B cannot be instantiated outside of class A, is this best achieved by making class...
[1 reply] : "Best" I'd say is subjective. There might be reasons you want to separ... (by Ganado)
Seekp() effects
 
from what I’ve heard, seekp() takes what is essentially your cursor and moves it to a new place in relation to the beginning of a stream. Could I use it to re...
[9 replies] Last: No problem! (by Ganado)
Issues with functions
 
Hi there! For a class project, we are supposed to write a code that basically works as a magic 8 ball. I think I got most of the things, but I can't really test...
[4 replies] Last: Hello BGA6444, Between what I said earlier and what lastchance has ... (by Handy Andy)
by dylred
Store the contents of a file in a 2d char array
 
I'm a beginner at C++ and I'm having a hard time trying to store file values into a 2d character array. I got it to work, kind of, but the problem is that beca...
[1 reply] : #include <iostream> #include <fstream> #include <string> #include <ve... (by lastchance)
Absolute maximum difference
 
Write your question here. Source:- https://www.codechef.com/JULY19B/problems/MMAX I did solve this problem but it has been accepted only partially can any o...
[3 replies] Last: Chef has K chocolates to lure N children .... Why are you performing... (by dutch)
Why the cin command does not working in my code?
 
Why the cin command doesn't working inside the 'if' statement? Compiler just ignores this command. #include <iostream> #include <string> using namespace std;...
[6 replies] Last: [quote=nakami88]I think you should use int a, not string a Why do yo... (by MikeyBoy)
by Manga
wxWidgets help
 
I am trying to learn wxWidgets. I followed a tutorial on youtube to get started. The tutorial is for VS2017, I am using VS2019 and having trouble. When I try to...
[8 replies] Last: Yes! That was the problem. I had it switched to windows in debug mode ... (by Manga)
by Ashmor
How to store a small array in a bigger one
 
Hey guys, I'm new to programming and C++. I have a little problem here. Is there a way to store a small array, say test , in a bigger one, say field ? I made ...
[4 replies] Last: lastchance , only now did I see your post. This is awesome! I made so... (by Ashmor)
by Ryan15
I don't understand how this program find prime numbers
 
How does this program find prime numbers and why doesn't the loop stops after it encounters the break statement? #include <iostream> using namespace s...
[2 replies] Last: break breaks out of the inner-most loop. It won't break out of both ... (by Ganado)
incorrect information on the polymorphism page
 
Hello! I propose to correct the error. on this page: http://www.cplusplus.com/doc/tutorial/polymorphism/ snippet: // dynamic allocation and poly...
[1 reply] : Yep, the code should have a virtual destructor. Not sure if it'll get... (by Ganado)
Tic Tac Toe Not Working
 
Good morning all. I have manually copied the below code from the book 'Beginning C++ Through Game Programming' as i could not seem to find it online using the l...
[5 replies] Last: Hi I have managed to find the entire code through another website whi... (by Zainyorkshireman)
Export from existing conan project the source code of all dependencies
 
I'm developing a C++ project using the Beast boost library through conan package manager: # ... include( ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake ) ...
[1 reply] : Have you looked around and asked here -> https://conan.io/ (by salem c)
Problem with random numbers
 
Hey everybodey i need your help to improve or to crrect this solution... 6.34 (Guess-the-Number Game) Write a program that plays the game of “guess the numb...
[1 reply] : Guessing a random number between 1 and 100, using C++ random number ge... (by George P)
by azsxd
dice game
 
Hi, I’m creating a game where the user challenges the computer in a dice game. I was wondering what the algorithm is for coding a game where the user plays ag...
[1 reply] : You'll need to be able to generate random numbers, either through rand... (by zapshe)
Converting QString to int
 
Hi everyone, I'm trying to convert a QString into an int. I have read the documentation (https://doc.qt.io/qt-5/qstring.html#toInt) but I don't understand th...
[2 replies] Last: Thank you salem c. Now I understand I could simply do something like t... (by jefazo92)
July 2019 Pages: 12345... 11
  Archived months: [jun2019] [aug2019]

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