Beginners - March 2021 (Page 8)

class
I have an assignment that requires alot of use with classes, the idea of the code is to manipulate fractions to find greatest common denominator (GCD) and other...
Mar 14, 2021 at 8:02pm
[11 replies] Last: Sounds like the meaning of "return type" has to be clarified. Read: ht... (by keskiverto)
Question regarding return in a function
Hello, I've found the following code for counting how many instances of the word balloon can be made for a given text. However, I have difficulty in understa...
Mar 14, 2021 at 6:05pm
[4 replies] Last: Thank you seeplus! I couldn't understand the link between the number c... (by gevCplus)
by Atom1
Adapt Polynomial Regression to C++ DLL (1,2)
In the code block, is a method for calculating a 3rd order polynomial regression fit. It is written in Easylanguage. I wish to convert this to a C++ dll in orde...
Mar 14, 2021 at 3:31pm
[22 replies] Last: I have built the project using your code, all it completed ok. One way... (by Atom1)
Prime numbers generater
Hi, I am working on a project where I need to create a prime numbers output. I am new in C++ and I am new on this forum too. I just need a simple code whe...
Mar 14, 2021 at 1:27pm
[5 replies] Last: Yes, that's true. I wonder what the difference in performance would be... (by thmm)
Matrix Addition Using Operators + and <<
Hello! I got an assigment this friday I have to write a program using Header File with the following data fields and functions. I'm having trouble with init...
Mar 14, 2021 at 3:07am
[1 reply] : Looks like you accidentally double-posted, please delete your other th... (by Ganado)
Linked list new node at back (segmentation fault)
I have a book inventory link list with a node struct that has 4 data types (name, price, amount, ISBN). It lets me enter all information but when it prints, it ...
Mar 13, 2021 at 10:50pm
[1 reply] : You don't show constructors of Node. I presume implicit default constr... (by keskiverto)
by Ch1156
Can you set an initialization constructor and use another for loading values from file?
Im working on a load file function and in my main program i have a constructor for my player that sets them up, and then in the switch statement in the while lo...
Mar 13, 2021 at 10:09pm
[2 replies] Last: Hi yes it is a class constructor, sorry for leaving that out. I could ... (by Ch1156)
This program is about weather statistics.
Having trouble writing program for this This program is about weather statistics. c++ Write a program that uses a structure to store the following data for t...
Mar 13, 2021 at 9:34pm
[6 replies] Last: Hello Evelynmkm27, Going over your revision it looks like you are goi... (by Handy Andy)
Integer inproperly initialized
I am writing a Duck Hunt program. The problem in detail is that when I type the correct number, the score variable does not go up. I was wondering if the variab...
Mar 13, 2021 at 8:30pm
[9 replies] Last: Hello HypeCoderPanda, Sorry about that. I have no idea how I got fixe... (by Handy Andy)
by Mif
How to create a menu with the list of elements that are in a text file? "C"
Hello again.. How do I create an interactive menu with the elements that are located in a text file ? For example the file.txt looks like this: myText.txt ...
Mar 13, 2021 at 12:01pm
[16 replies] Last: This is a simple C test program to show the use of GetProcAddress() in... (by seeplus)
Multiplication of elements of two array issue.
Suppose you want to multiply the elements of two array, whose size are entered by the user. I wrote this one whose result is (elements of first array are "1,2,3...
Mar 13, 2021 at 10:14am
[2 replies] Last: int* array1 = new int; // array1 points to one int // The size of "... (by keskiverto)
Trouble trying to remove odd numbers from stack
Hello I'm trying to create a stack program that only contains even numbers, basically the program will have some hard coded odd numbers but MUST filter them out...
Mar 13, 2021 at 4:20am
[2 replies] Last: A comment mentioned using the STL stack, so do you really need to im... (by FanOfThe49ers)
Reducing fractions
I need to write a program that simplifies an array of fractions, converts them into decimal form and then adds them up. So for 4/8 and 9/15, the output would b...
Mar 13, 2021 at 2:20am
[6 replies] Last: Ah. Well that is about useless :) Carry on! (by jonnin)
Time in c++?
I thought of making a race simulation where two (or more races ) start across the galaxy and try to colonize it. I have a dilemma about a timer I was trying to ...
Mar 13, 2021 at 2:14am
[1 reply] : you want threading and sleep_for http://www.cplusplus.com/reference/th... (by jonnin)
TicTacToe illegal moves and winner, array, functions
so i am in a beginners c++ class, and we have an assignment where we make a tic tac toe game with arrays, but our next step is to find illegal moves and cout il...
Mar 12, 2021 at 10:48pm
[5 replies] Last: I think I did it with a 1d array #include <iostream> using namespac... (by ccorkran)
by maple
Questions about the use of fstream::seekg
Hello, everyone, I was doing an exercise to write the relative starting position of each line to the end of file "test.txt". The code is as below, and it can be...
Mar 12, 2021 at 3:23pm
[5 replies] Last: @salem c, thanks a lot and I totally agree with your explanation. Ind... (by maple)
Question for a bool function
Hello, I've looked over the net for a function to break a vector into three parts with equal sum and I found the following. However, I can't combine in my mind...
Mar 12, 2021 at 1:51pm
[3 replies] Last: Excellent! Thank you guys! (by gevCplus)
by bstroe
Inserting the average into the matrix
Write a function called insertedAverage : void insertedAverage (int &N, int &M, double mt , int k) The function will insert at position k a new line in the ma...
Mar 12, 2021 at 12:44pm
[3 replies] Last: Thanks @lastchance !! (by bstroe)
by gvdg
Stream I / O
Write a program that will add information entered from the keyboard to a text file (according to the option). It should be possible to select an operating mode ...
Mar 12, 2021 at 10:51am
[7 replies] Last: Can you tell me how to save the data in a file as a structured table ... (by seeplus)
.txt array help
First time working with a .txt to an array. I need help figuring out how to be able to get all the numbers in said file to be integers for me to use for things ...
Mar 12, 2021 at 10:31am
[7 replies] Last: @Andy, L33 - No, as you just previously incremented arrayCountIdx ! (by seeplus)
March 2021 Pages: 1... 678910... 13
  Archived months: [feb2021] [apr2021]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.