Beginners - November 2020 (Page 6)

Incompatible parameter type
I'm doing classes for my assignment and the example we were given did not deal with int's and double's, but the assignment does. I've gotten to the point where ...
Nov 18, 2020 at 8:24pm
[6 replies] Last: Hello rovert456, Sorry about that I should have been more clear. Yo... (by Handy Andy)
functions and maths. correct my code, please
Q: given real numbers X and Y, solve(or calculate) f(x,5) + f(y,5) + max(f(x^3 - y^3, 3), x^3), where f(a,b)=(a+b)^2 + (a^2/b^2). so it's like f(x,5)=(x+5)^2 ...
Nov 18, 2020 at 8:04pm
[10 replies] Last: @seeplus, it is, thats why i said some, and it's okay:) thanks for eve... (by laura fidarova)
pls i want an answer today thank you
Given a txt file named Heap.txt in which it is stored 14 integers that have the minimum layout heap. You should read this file and get it save to a table of ...
Nov 18, 2020 at 7:44pm
[3 replies] Last: Here's the code, or close enough, right? #include <fstream> #inclu... (by mbozzi)
accessing private data to initialize object using overloaded operator
Im needing some help to access a private data member while using an overloaded operator. #ifndef Shape_hpp #define Shape_hpp using namespace std; #includ...
Nov 18, 2020 at 7:40pm
[2 replies] Last: Hello Matteo1230, When I tried looking at the code that you posted I ... (by Handy Andy)
How to create vector of polymorphic items
Background Information - I am consuming an API that gives access to a read-only buffer of floats (const float*) - I need to break this up into chunks which I ...
Nov 18, 2020 at 5:24pm
[11 replies] Last: Goal: No raw pointers :) This is advice I see time and time again in... (by mbozzi)
Polymorphism - Initializing objects from abstract and behaviour classes in C++
I'm creating a program that will simulate a race between various runners, using behavior classes to implement different types of runner movements. To do this, ...
Nov 18, 2020 at 4:44pm
[5 replies] Last: That's a linker error you're getting. Are you sure your project/makef... (by MikeyBoy)
error :no suitable conversion function from "sBoard" to "int" exists
I need to build a game that consists of a board, marbles, holes, and walls. All marbles are assigned to positive numbers and holes would be negative numbers. It...
Nov 18, 2020 at 2:44pm
[16 replies] Last: boardArr is int No. Every one of the variables you've called "board... (by MikeyBoy)
Return the number of times the character " " appears in the text.
I need to make a Word Counter, I need to Return the number of times the character " " appears in the text. with a function that accepts a pointer to a C-stri...
Nov 18, 2020 at 11:59am
[10 replies] Last: #include <iostream> #include <cstring> using namespace std; int num... (by againtry)
by Rileey
error: expected primary-expression before '.' token
I keep getting an error trying to call my struct, my assignment for this is to create an organized table of information about the given pets. We were given: Pet...
Nov 18, 2020 at 11:56am
[4 replies] Last: Also #include <iostream> #include <iomanip> using namespace std; ... (by seeplus)
Change symbols in the string
Q: "in a given string change all the entries of '$' to '*' until the first entry of '?' and delete all the '@' after '?' " it also says that you need to use <...
Nov 18, 2020 at 11:18am
[5 replies] Last: i'm late, but thank you all so much:) (by laura fidarova)
Object Oriented Programming Help
Hey there all! So i've been working with this code my professor provided us, and it seems I can't get this to implement correctly. What i'm trying to do is ...
Nov 18, 2020 at 8:02am
[1 reply] : class Composite : public Polyhedron { public: using Colle... (by keskiverto)
by breton
little problem on my code
Hello people and sorry for my english. I have un problem on my little game console, found mysterious word. When my count thread has finished, for me it should...
Nov 17, 2020 at 11:23pm
[5 replies] Last: It seems that you want to consume characters entered while clavierEtei... (by dutch)
Display User's Input Horizontally
Is there a way for the user's input to be shown horizontally? My desired output is You may enter up to 50 integers: How many would you like to enter? 12 Enter...
Nov 17, 2020 at 7:05pm
[4 replies] Last: I have another example imyourjoy if this still interest you, only t... (by Mif)
How to ignore the last line of a file
Hi, I am stuck on one part that I could not figure out. How do you not read in the last line of a file into your program? I tried looping but that did not work...
Nov 17, 2020 at 5:21pm
[8 replies] Last: By reading the whole file into a string: #include <string> #include... (by seeplus)
by Mif
How to return a random line from a text file using "C"?
Presuming I have this in a test.txt file: 1 2 3 4 5 And return a random number from the file: void retrieveRand() { FILE *file; char fname = ...
Nov 17, 2020 at 2:54pm
[11 replies] Last: Ahh okay.. understand now .. just to ignore it.. and then print whate... (by Mif)
From 0 to God plus plus (joke)
C plus plus CHAPTER 1 From 0 to God plus plus mode In this tutorial we will learn c++ in 10 pages. First we download all the IDEs from the creation of a single ...
Nov 17, 2020 at 2:13am
[no replies]
TXT FILE
Pals, How to insert and extract in a TXT FILE a data structure which is defined as a pointer? struct abc { int a; char b ; char c ; int nra=0; ...
Nov 16, 2020 at 4:24pm
[3 replies] Last: thank you folks! (by MaxGreen)
Program to find Fibonacci Series up to n number of terms
Program to find Fibonacci Series up to n number of terms #include <iostream> using namespace std; int main() { int n, t1 = 0, t2 = 1, nextTerm = 0; ...
Nov 16, 2020 at 2:10pm
[2 replies] Last: after you get past roundoff error in the first few terms its just a co... (by jonnin)
How to use arrays
So, I just moved past simple data types in my computer science course, and we've moved onto arrays. I'm so confused. Here's my task: Write a C++ program that de...
Nov 16, 2020 at 2:09pm
[7 replies] Last: be careful with pointers and arrays and copy vs reference. you can c... (by jonnin)
Criteria enforcing programme
Write your question here. The file format the program wih from read First Name : john Last Name : peter Gender : M Student ID : 7483...
Nov 16, 2020 at 1:56pm
[15 replies] Last: Updated process() function that deals with Pure Maths & English Lit [N... (by seeplus)
November 2020 Pages: 1... 45678... 14
  Archived months: [oct2020] [dec2020]

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