General C++ Programming - February 2021 (Page 5)

by mxkxx
cant open the exe file
 
i cant open the exe file in the folder. It says System error and " The code execution cannot proceed because libgcc_s_seh-1.dll was not found. Reinstalling the ...
[3 replies] Last: set the path works too. add the folder where the dlls you need live t... (by jonnin)
by mxkxx
cant run the file
 
I am running code blocks and I have a header file "Studnets.h" that I am trying to have another file see. When I #include "Students.h" it says "no target" in...
[1 reply] : We would need to see the file tree of your project to really know how ... (by Ganado)
Random binary numbers matrix
 
Hi guys, I got a matrix and I want to fill it with random binary numbers (0,1) but I want a specified number of 1's, how can I do this? I know that I can use sr...
[6 replies] Last: THANKS!!!! (by ZAlexN1)
Why is my int value not changing to end the while loop?
 
So I'm making a C++ program for college. And my program is supposed to keep looping unless the user chooses 0 to exit when it says "Recalculate? (1 = Yes, 0 = E...
[4 replies] Last: Posix specifies M_PI , but it is not part of standard C or C++ . (and... (by JLBorges)
Uninitialized char* generates error
 
Hello. This is my code: #include <iostream> int main() { char* fileName; std::cout << "File: "; std::cin >> fileName; } And it generates this error: er...
[7 replies] Last: Okay, thanks! :P (by SirEnder125)
register values
 
Ok so, I want to access this within C++: R0xAF = 0. I can set it to 0xAF with no but then I lose the bracketed results (i.e. 0xAF and 0xAF . How ca...
[3 replies] Last: Did you really expect people to understand what you were talking about... (by dutch)
I never use pointers in my C++ code. Am I coding C++ wrong?
 
It's hard to tell whether you code wrong or not... When you use the standard library you can actually avoid pointers to a certain degree. They are handling the...
[11 replies] Last: iterators still feel like holding a hammer and seeing nails everywhere... (by jonnin)
by ngb123
Use of mini-class in a main-class
 
Hi everyone, I am working with a class called "Rotations" where several constructors and static functions for vector calculations are implemented. Half of th...
[2 replies] Last: what was ugly? you can make an 'automatic casting' between the two typ... (by jonnin)
Program doesnt sort
 
Hi, i tried to make a program that will sort a 2d array rows in ascending order, with the bubble sort,but it doesnt work, can someone please tell me where is th...
[4 replies] Last: C++ doesn't have variable length arrays, the size of the array has to ... (by George P)
Decimal / Enter key problem
 
As seen in my code below I have 'double' to allow for decimals. Below 'cin >> length;' I have the 'cin.ignore();' which should ignore the enter. So, it shouldn'...
[2 replies] Last: Put simply, >> ignores leading white-space (space, tab, \n) and stops ... (by seeplus)
Shapes using inheritance and polymorphic
 
HEY! I have the following code(bottom) which is 90% complete ..I'm trying to calculate shapes' areas using inheritance and polymorphic pointer(in main). there'...
[2 replies] Last: thank you <3 (by jeraya6)
Inheriting template class.
 
How to inherit template class. I am getting some sort of error which I can not understand.How to rectify this? // How to inherit a template class #inclu...
[1 reply] : You need to specify the template parameter for the child class as well... (by thmm)
implementing classes' methods in Main()
 
Hey i have this Code (bottom) tbh i don't know what i'm doing wrong in implementing classes' methods really.. can someone fix this ? also: before i tried runni...
[7 replies] Last: More comments. Course::getStudentByName() returns an array of students... (by dhayden)
Visual Studio 2019 GUI - Groupbox creating with loop
 
Hello, I'm using Visual Studio 2019 with c++ to create some GUI applications. For a project, I need to create many groupboxes when users click the button. I kn...
[1 reply] : What are you using, Win API, C++ CLR, or other framework? (by thmm)
by frek
Mylist review
 
I'm evolving a non-STL version of a list called Mylist as in the following code: #include <iostream> template<class Elem> class Mylist { public: class Iter...
[16 replies] Last: Here's probably the last version of Mylist with an embedded function... (by frek)
Need to solve a casting issue
 
Hey guys, I am completely new to C++ and have been trying to learn as I solve an assignment problem. The basis of it is that the program iterates through a tup...
[5 replies] Last: Maybe something like this? #include <iostream> #include <string> #inc... (by mbozzi)
New to programming
 
Understanding if else Statements Summary In this lab, you complete a prewritten C++ program that computes the largest and smallest of three integer values. ...
[3 replies] Last: we want to help you. to do that, you need to ask a question and post ... (by jonnin)
Is it possible to executed only while debugging NOT _DEBUG MODE
 
I use __debugbreak() like this. #ifdef _DEBUG if(~) { __debugbreak(); } #endif If this code executed while debugging, then maybe stopped...
[4 replies] Last: https://docs.microsoft.com/en-us/windows/win32/debug/configuring-autom... (by salem c)
by VoB
Why isn't move semantic called?
 
Hi everyone, I was trying to implement by myself an analogous of the std::pair , which I called ppair . I wrote the following class (since everything is pu...
[10 replies] Last: > is this what you meant? Yes. (by JLBorges)
by kg88
Need to figure out what is wrong with this code
 
Hi I need a little help with this code that I've been writing for an assignment. This is what I have: #include <stdio.h> #include <iostream> #include <cmath...
[6 replies] Last: Thank you for the knowledge Ganado! I definitely need to work on inden... (by kg88)
February 2021 Pages: 1... 3456
  Archived months: [jan2021] [mar2021]

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