Beginners - September 2020 (Page 4)

Displaying average age and youngest student's name
 
This question is a follow-up from my previous one. Write a program that needs to read a input file and populate a set of Student objects. Then it will display ...
[5 replies] Last: The original assignment guaranteed a nullptr at the end of the array. ... (by dhayden)
Student Records - Reading & Displaying from Input
 
I'm currently writing a program that needs to read a input file and populate a set of Student objects. Then it will display the objects, and perform some basic ...
[14 replies] Last: See continuation of this at http://www.cplusplus.com/forum/beginner/27... (by seeplus)
Help with C++ program that calculates Volume and Surface area (intro to C++ assignment)
 
In this assignment I am to use the given statements in the incorrect order and rearrange them in the correct order. This is what I have come up with and I will ...
[4 replies] Last: If you factorise the algebra, you get: V = (PI * r)(r * h) A = (PI * ... (by seeplus)
Issues with Dynamic Allocation of Arrays
 
I am having trouble growing the allocated memory of an array using pointers. There is a Grow() function in my program that is meant to double the capacity of th...
[3 replies] Last: In addition to above issues, finalize() has to reset size and capacity... (by seeplus)
convert int to string in leap year calculation
 
int month; while(std::cin >> month) if(month > 0 and month <= 12) std::cout << "The " << month << " month is " << month_names[month-1] << '\n';
[7 replies] Last: To check if a year is a leap year, then as well as checking for a mult... (by seeplus)
Random number generator for Sally
 
Hello I would like to make a function that generates random numbers between a minimum and a maximum number for my code that I posted there: http://www.cplusplu...
[7 replies] Last: It doesn't work either, I have results that don't correspond with the ... (by annolliwohe)
C++ Win32 API Check Encryption Bitlocker FDE
 
Hello, I'm trying to run the below script, but it's failing. The end goal here is to tap into the Win32 API to see the shell values for System.Volume.BitLocker...
[7 replies] Last: I see, that makes sense and i can now poll my application output into ... (by lloydie12)
by Rlabee
expected declaration
 
Hello all, I need to wright a program that asks for the price of several items and adds tax to them. So item 1, 2 and 3 will get 21% taxes added. and Items 4...
[3 replies] Last: thanks jonnin, really learned a thing or 2 thanks to your reply. Han... (by Rlabee)
freeing memory when passing objects
 
Hello, I am currently learning about passing objects to functions from my book, and I am wondering a few things about what it has said. I am hoping someone coul...
[4 replies] Last: What book are you using? Passing an object by value will cause a copy ... (by seeplus)
How to create a word and sentence counter
 
I am trying to write a program to determine the number of words, number of sentences, as well as the average words per sentence. I'm really unsure of where to s...
[17 replies] Last: Ignores final sentence for the sentence count if it doesn't end with o... (by seeplus)
by ericM
boost issue with static linking
 
Hello, I am building a code which makes use of boost libraries. My CMakeLists.txt looks like the following: cmake_minimum_required(VERSION 3.5 FAT...
[3 replies] Last: It is probably a version conflict. Either the compiler or the target s... (by coder777)
by ebz
Why does std::make_unique work in Visual Studio but not g++ on linux?
 
I've got a very simple piece of code that runs prefectly on Window's visual studio but doesn't on Linux (g++). I get the following error on Linux: /u...
[3 replies] Last: @jonnin You pointed me to the right direction! It wasn't the order but... (by ebz)
Rounding up to the nearest integer
 
Hello everyone, back with the simple stuff. I got some an issue with rounding up. Could you please explain how this works? Thank you for your time coders. Here ...
[12 replies] Last: I'd think just converting from a float to an int would just automatica... (by jonnin)
by Mif
Need help with warning message
 
I get this warning ||=== Build: Debug in menu_1 (compiler: GNU GCC Compiler) ===| C:\Users\Desktop\Projects\menu_1\main.c||In function 'menu':| C:\Users\De...
[15 replies] Last: its your program i'm not that worried about it. I realize some progra... (by markyrocks)
Not printing file correctly
 
So I am trying to read and print a file for an assignment but it doesn't print exactly how it is in the file. Can someone help? //file /*r bqk nr ppppp...
[17 replies] Last: That code assumes that each 'line' in the file is exactly SIDE chars ... (by lastchance)
by momof4
vector push back
 
I asked earlier about the vector resize, and I think I've got that issue figured out. I'm struggling with the push back now though. I thought it was working out...
[10 replies] Last: The third time I though, it tells me that it successfully resized f... (by dhayden)
by felloz
object class
 
Hello, I'm learning about classe's right know, and I see that a class can have an object itself, for example class Class_name { //todo }name;...
[4 replies] Last: In this example the object class is `name` No. The class (aka type) ... (by dhayden)
dynamic memory pointer in arrays
 
hey lads, your help will be welcomed :))) I need to write a code which will copy all the odd and even elements from the original array into 2 new ones. A...
[3 replies] Last: #include <vector> #include <iostream> using namespace std; int main... (by markyrocks)
error in presenting the highest and lowest value in c ++
 
I believe the problem lies in the if ties. #include <iostream> #include <iomanip> #include <cmath> using namespace std; void valor_maior(void) { ...
[6 replies] Last: #include <iostream> #include <iomanip> #include <cmath> using namespa... (by againtry)
How to stop a thread that runs active always?
 
Hi, I have trouble with the following code. I want to create a thread that runs always. I want to stop it only when a variable changes from true to false. When...
[2 replies] Last: Ok, I found the solution. I am using Linux and trying to run it on Lin... (by kahlenberg)
September 2020 Pages: 123456... 10
  Archived months: [aug2020] [oct2020]

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