Beginners - May 2020

Saving in binary files
 
So what I'm trying to do is to save a linked list, like the one bellow, in a binary file so in case that the program crashes or something, I don't have to re-ad...
[15 replies] Last: Just open if for writing. That will clear it automatically. (by dhayden)
by dwvky
Is have any code can substitute to_string?
 
The thing is this, I am finishing my homework but my compiler cannot use to_string。I tried using std :: to run it, but it has no effect.Is have any code subst...
[10 replies] Last: The problem has been solved, thank everybody for helping me (by dwvky)
Switch case but need to loop the question back and forth
 
Basically I am having trouble with this code since it does not loop the question back. It automatically proceed to the next question. Need help here since Im jz...
[2 replies] Last: actually i wanted to loop the question of asking the user's name insid... (by rhap123)
by Dalski
Best API/ GUI For Working With Pdfs?
 
Does anyone have any recommendations for a relatively easy to work with API platform/ GUI for working with pdf files? I've just finished https://www.learncp...
[13 replies] Last: Option for c# are itext https://itextpdf.com/en (by Thomas1965)
Null statement on switch case and if and else statement
 
im currently having problem of using null statement on my switch case by using the if and else statement. Pls help me. switch (o) { case '1': ...
[7 replies] Last: hmm i have done the getline part but if i wan to use it as a float(dec... (by rhap123)
by vsxxx
New to programming, needing help with a task.
 
Hello. I have a task to do a program, which does: Sort the rows of a two-dimensional numeric array in ascending order and display the maximum elements for each...
[3 replies] Last: Thanks you all for the help, we will see what we can manage to do :D (by vsxxx)
wrong sum produce for program having two arrays
 
Dear Freinds , I am new to C++ and still trying basic programs. Here i am trying to get the sum of two arrays call A and B. I always get the sum of first arr...
[9 replies] Last: Hello hekanayake, When posting code of any size it is best to use cod... (by Handy Andy)
multiplayer space shooter problems
 
Write your question here. I found a space shooter program and decided to tweak it. I tried to make it multiplayer. I can't figure out how to make player 2 (th...
[2 replies] Last: Thank you I now have a better grasp at OOP and yeah lol you brought up... (by scourtheweb007)
Sales Commission Program
 
I'm wanting my program to account for users that input their own random commission rate or quarterly sales. What would I need to change to make my program accou...
[2 replies] Last: Yes, but do you happen to know of a solution to my problem? (by mourtzouphlos)
Need help with my code!
 
Hello! I've been trying to code a random number generator for a text-based combat game, the code compiles but I get the same result every time no matter what, I...
[5 replies] Last: std::random_device is not fully implemented with MinGW. At least up... (by George P)
turning
 
can someone turn my code , to use pointers and functions ? the more pointers and functions the better #include <iostream> #include <cmath> #include ...
[6 replies] Last: I'm itchin' to plop in a lot of smart pointers, with a soupçon of ... (by George P)
Having problem with storage class
 
Im having the error of the storage class. pls help me register.cpp #include <iostream> #include "Register.h" #include <string> using namespace std; int main...
[7 replies] Last: ty i manage to solve the problems. (by rhap123)
How do I determine the size?
 
Hello, How do I determine the size? Thanks #include <iostream> using namespace std; int* EvenOROdd(int myArray , int length) { int* p = ne...
[9 replies] Last: You could return size in a reference parameter. Also, EvenOrOdd is a b... (by dhayden)
How to call my superclass method?
 
I came up with the idea, overloading the opertor method from std::vector, within it i need to call std::vector's own operator method, but I got stuck with. H...
[2 replies] Last: Thank you Repeater! (by nuderobmonkey)
Help Understanding Bool statement
 
Hello all, I need help understanding what is happening in a code I wrote. This is the answer I wrote for the following question: "Write a program that gives ...
[2 replies] Last: @jlb Thanks for the response, I see what you are saying about localiz... (by noblemin)
accessing a one-dimensional vector in 2-dimensional manner
 
Is there a way, overloading the operator of a std::vector<int> my_v(row*col) in such manner that I could it access by my_v ?
[14 replies] Last: But overall, it is true that a 2x boost is significant, so if you were... (by jonnin)
Tracking iterations of number in a list
 
Hello all, This is the answer I got for the following question. "Write a program that will read a file of numbers of type int and output the frequency of ...
[15 replies] Last: even without the c++ toys, you can do it with a better algorithm. Th... (by jonnin)
by Utku
Pure virtual function, inheritance and call by reference from inherited vitrual function
 
Hello all. I am implementing a move() method in a Car class. This Car class is inherited from a Vehicle class and the Vehicle class has a pure virtual move() fu...
[14 replies] Last: Hello. Ask your prof if you can add setNext1(), setNext2() and setNe... (by Utku)
Vector Erase Confusion
 
Hi everyone, I'm trying to convert some C++ code to another language but I'm struggling to understand what a couple lines of code are doing. Here are the two c...
[2 replies] Last: Thanks for the reply. Turns out I used the wrong definition in the OP.... (by dialgpalkia)
why am i getting segment fault
 
I am trying to manually enter names in the for loop why am i getting segment fault really confused and how to fix it, thanks in advanced string names = {...
[8 replies] Last: @Ganado Interesting I misread this somewhere :) thanks! (by malibor)
May 2020 Pages: 123... 17
  Archived months: [apr2020] [jun2020]

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