Beginners - October 2020

Calculations between VERY small numbers.
 
I am doing a class assignment on calculating very small numbers. I didn't get very far because the numbers all somehow turn into 0. Like 1/13! is a very small d...
[5 replies] Last: To add to that embarrassment I think you meant COMMA, but don't sweat,... (by againtry)
Building a program
 
Hello MauriceF, Apparently OP has bailed. As best as I can remember this is the original code. And the question had to do with reading 4 rows and not 3. #in...
[6 replies] Last: Hello MauriceF, Since you are using a floating point variable you sho... (by Handy Andy)
Read and Write from File in C++
 
Hello, I wrote a simple program. I have three rows and columns. When I want to read from a file, the program read four rows instead of three rows. #...
[10 replies] Last: Hello Shervan360, If you have the time post your new code. If you are... (by Handy Andy)
Modulair program with (index/arrays)
 
I would start small. Create an array with 10 elements and read the numbers into it. Don't worry yet about the range and the uniqueness. Then display the array t...
[6 replies] Last: And this is what that looks like if you (automatically, so it can be s... (by againtry)
by ntpdev
Assign pointer of derived class to pointer of base class
 
I assign pointer of derived class to pointer of base class. I wonder why the address of both case are different. Case 1 #include<iostream> using names...
[1 reply] : In the case where A is empty, it's address doesn't matter (it's just f... (by dutch)
Telephone Numbers
 
Hello again coders, I have another project to do. So far so good I would say. Just one issue with it. It's asking me to make the program accept input and produc...
[6 replies] Last: thank you coders for your hard work. Everything works great! (by Frank5093)
Pennies on change making program not adding up
 
I am in a intro C++ class. Our 4th group project has us making a program to calculate change from purchase price and tendered amount with outputs of the number ...
[4 replies] Last: Thank you Andy! I looked at the schedule and we will be diving into st... (by TaftBeach)
Best way to "get into" creating "GUI" programms?
 
Time appropriate greetings everybody! I have just recently (few weeks ago) gotten into messing around with writing C++ "console applications". For some of t...
[7 replies] Last: BTW main in a Qt project is invariably about a dozen lines, if that. h... (by againtry)
error LNK2019
 
How do i interpret an error like this: 1>------ Build started: Project: Project2, Configuration: Debug Win32 ------ 1>main.cpp 1>main.obj : error LNK2019:...
[3 replies] Last: http://www.cplusplus.com/forum/general/113904/ probably http://www.cpl... (by ne555)
by alexas
MKL random generator correlates 100%
 
When checking my random generator, I am getting total correlation for the initialized random sequences. Why? RandomGenerator::RandomGenerator() { vsl...
[2 replies] Last: Thanks, I understood my possible mistake! (by alexas)
by dean
TMP, discover whether the return type of a callable is boolean
 
Hi there, how can we detect the return type of a callable? std::invoke_result requires to specify the complete signature, which I don't know. Example: ...
[6 replies] Last: How can I move the thread to the other forum? Don't move this one... (by doug4)
by fifios
Trying create an array size based on user input filled with random ranged numbers
 
My goal is for the user to input a number from the range 3 to 8 and it will a create matrices based on that size and then fill it with random numbers from the r...
[7 replies] Last: OP doesn't mention 2-d array. No, but line 30 of the initial paste... (by doug4)
playing with numbers
 
Hello everyone, so I have a hard one. So far I have the code to run for normal numbers. Here it's asking me to write a program that prompts the user to input an...
[9 replies] Last: Alternative take using recursion: #include <iostream> #include <cma... (by seeplus)
by maulk
Need help
 
Hello, I cant figure out why my code will only display up to number 9 and not 13 #include <iostream> #include <string> using namespace std; int main() ...
[6 replies] Last: Since the OP seems to have a habit of deleting their posts after getti... (by MikeyBoy)
Traingular integer Sequence
 
How do i print the following using nested loops 654321 54321 4321 321 21 1
[5 replies] Last: You don't need nested loops. Just one. #include <iostream> int mai... (by seeplus)
by jax16
What is ADT?
 
Can someone tell me the difference between an ADT and a class or struct? It seems the same. And can you give me an example of the two? I am struggling here. ...
[11 replies] Last: Side note: The abbreviation ADT can, in some other programming langu... (by Albatross)
by Mif
How to compare the first string from last line in a file.txt 'C' (1,2)
 
I need to compare the first string from the last line in a file.txt So if the file.txt contains the following: 22310 01 09 2020 22500 01 10 202...
[27 replies] Last: Ouu I guess you replay after I replay so.. just to know, I solve the... (by Mif)
free vs delete and would this leak?
 
This code was given to me, via wikipedia. see :http://www.cplusplus.com/forum/beginner/273703/ #include <stdio.h> #include <stdlib.h> #include <cxxabi.h> int...
[9 replies] Last: Because this was an exercise for me in how to use unique_ptr. In every... (by closed account oivD8vqX)
by lychee
boolean how to print "on" "off" instead of 1 and 0
 
I am doing multiple inheritance this is my display function void HotAirBalloon::display() { Balloon::display(); Basket::display(); cout << "Burner...
[3 replies] Last: An alternative to the if/else block, the conditional operator : s... (by George P)
by dutch
Integer Partitions
 
This is an interesting Mathologer video: | The hardest "What comes next?" (Euler's pentagonal formula) | https://www.youtube.com/watch?v=iJ8pnCO0nTY It's about...
[8 replies] Last: Come in spinner - bait, hook line and sinker taken in one gulp. I didn... (by againtry)
October 2020 Pages: 123... 13
  Archived months: [sep2020] [nov2020]

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