Beginners - February 2019 (Page 11)

I am trying to learn C++ and a foreign language
 
And to combine both of them I thought to make a program in C++ that verifies the sentences that I hear on the audio book. I have two text file ROM.txt and GER....
[10 replies] Last: Yes it help me a lot. Slowly I am organizing my knowledge. I made prog... (by actyon20)
Card Games
 
I wrote a struct for one single card. I am inheriting this struct into my Deck52 class. Deck52 is a member of Game HILO class. Here is my question : I have ...
[2 replies] Last: What is the point of the card class? Is it complex enough to justify... (by jonnin)
Help with 2D array sorting
 
I have to make a program that rearranges the rows so that the last column has the numbers in descending order (using the selection sort) From this -9 -5 -3 ...
[4 replies] Last: Lets pretend that you could write the aux=a ; a =a ; a =aux; as... (by keskiverto)
Getline and CSV file
 
So I have been trying to extract each line from a CSV file in the section of code below and I am having trouble with it. std::ifstream Stream; ...
[4 replies] Last: OK. Thank you so much. I did not know it was that easy! I guess I shou... (by SplashFreeze)
by axn9
Rotation Matrix
 
Hi everyone, i am currently teaching myself c++ and I'm am trying to create a programme where a user can input a 3-D point and rotate that point by an inputed a...
[5 replies] Last: If you put it in ONE file (rather than several) it would be possible t... (by lastchance)
Pre-compiled headers
 
Heyy, I have a few quick questions regarding pre-compiled header files. Do pch files improve overall program performance or just compilation speed? And while I'...
[5 replies] Last: I'm for using pre-compiled headers for headers that are required to be... (by JLBorges)
Sorting prime function in ascending order
 
I created the void AllPrimes function to display all the primes numbers. However, I need it to display the Prime numbers in ascending order. Right now it displa...
[12 replies] Last: If b evaluates to true for any even value of c other than 2 then ther... (by lastchance)
by cash
using functions
 
My code shouldn't have anything other than function calls in the main, I'm having trouble on how I can do this? #include <iostream> #include <iomanip> ...
[2 replies] Last: Surely this code has appeared before? @cash, your determination of sm... (by lastchance)
Super Big Tic-Tac-Toe
 
I am extremely new to coding, and my ambition may be something that I should really wait a few years for. I am sure everyone has played the worst game in the w...
[4 replies] Last: By the way all suggestions above are suggesting you to learn C++ progr... (by Grime)
How to send an email?
 
I know this is probably a stupid question, but I've been looking for tutorials and examples and all I get are nefarious ways to send keyloggers or something dum...
[10 replies] Last: > I am using Linux. Debian, Ubuntu, Redhat, Suse, Gentoo ............... (by salem c)
by Horror
While loop (Converting Letters to Number in A Telephone Number)
 
I'm trying to do a program where it converts letters into numbers in a telephone number. For example, For example, using letters, the telephone number 438-5626 ...
[7 replies] Last: Mixing methods to get data from the input stream (std::cin >> and std:... (by closed account E0p9LyTq)
Input file is not opening
 
When I run this code it stops at the if statement and says my input file is not opening on the console. My output file gets created but nothing is being stored ...
[8 replies] Last: Hello dbarclay100, PLEASE ALWAYS USE CODE TAGS (the <> formatting b... (by Handy Andy)
char* check not evaluating. Morse to Text Prob. Please helplem
 
Hello :) So I'm learning pointers and we're supposed to convert morse to text and vice versa. As you can see from the code below, the string library is not all...
[4 replies] Last: Here's an idea: char morseToChar(const char *m) { if (!m || !*m... (by dutch)
string::npos doesn't match find
 
Hi. I got a split function that's not working, and I'm very confused as for WHY it doesn't std::vector<std::string> split(std::string str, std::string token)...
[5 replies] Last: +1 (by Duthomhas)
Classes
 
Hi all, We're doing classes in CPP at my course right now using OOP and Im a bit lost with them. I understand the whole process - I think, but I just cant seem ...
[7 replies] Last: You don't need a ternary operator to return the result of a boolean op... (by lastchance)
Triangle centroid
 
Hello, i was trying to make a small program that calculates the centroid of a triangle given the coordinates of its points. Is it possible to shorten line 4 and...
[2 replies] Last: Hello Yuripetrocchi, To go along with what salem c has said. "double... (by Handy Andy)
How to access derived class members from virtual base class object?
 
I'm writing a program that uses a base class with a constructor that takes a bool variable. If the bool is true then it will create a dynamic array, if false it...
[2 replies] Last: You need a better understanding of pointers. bag daptr(pass); daptr... (by dhayden)
"not declared in this scope"
 
I know this is something very simple for someone, but I'm just trying to dip my toes into using classes, and it's not working. So, I've set up a simple header ...
[4 replies] Last: Thank you too, Andy. (by Cheddar99)
Finding the Index/position of Min and Max
 
I am looking for some assistance on my code. Right now I have to take a text file with a first name, last name, and the number of movies they have seen. I have ...
[3 replies] Last: It's usually more flexible to return an index (or an iterator) instead... (by dhayden)
Pointers
 
I am starting to learn about pointers and I have to call a function that resets a negative int to zero. I can do it when I pass the pointer as an argument but t...
[14 replies] Last: I think you still don't quite have it. Starting at step 14: // 14. ... (by dhayden)
February 2019 Pages: 1... 910111213... 23
  Archived months: [jan2019] [mar2019]

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