Beginners - May 2021 (Page 9)

Am I on the right track?
 
The program is meant to read a .txt file a line at a time using getline. Encrypt each character adding an encryption factor to the ASCII value and write the st...
[15 replies] Last: #include <iostream> #include <string> #include <fstream> enum Enc_t... (by seeplus)
by Boogey
Terminating
 
Where did i typed wrong in order for the code to terminate when user chooses the 'e' action? Thank you in advance! /*Author:(My name will be here) The foll...
[3 replies] Last: Hello Boogey, A few more suggestions: /*Author:(My name will be her... (by Handy Andy)
[code review] finding prime numbers
 
// finds primes in [lower_bound, upper_bound] closed interval #include <iostream> #include <vector> #include <limits> constexpr int lower_limit = { 2 }; cons...
[18 replies] Last: I think truncation has a historical basis, which in turn, I believe, ... (by jonnin)
Open and Read file question?
 
Hi! I was just wondering if I could get a little direction on my final project. I'm a super noob so apologies beforehand! A little back story: I work in a b...
[4 replies] Last: you do not sound like you need a file at all so far*. it sounds like ... (by jonnin)
Iterate through function?
 
Hi I have the following function: void applyAllOps(string origin, const string& charset) { for (int i = 0; i < origin.size(); ++i) { string...
[3 replies] Last: I'm still surprised that more people arent excited about coroutines. ... (by mbozzi)
How to Show a sentence using string function
 
There is a sentence "C ++ is an easy language" how to get the word "EASY" from the sentence by using the C ++ string function? Give the script too
[3 replies] Last: Hello ninetails99, As salem c suggested start at his link and check... (by Handy Andy)
Derived class constructor error
 
First of all, I am a beginner in C++ for 3 months now. These might be some stupid mistakes I made. My code still can't be compiled and it shows the following er...
[5 replies] Last: Thank you so much :D . It works perfectly now (by nomnomu)
Dont understand the code properly...
 
As it appears, I have started to learn C++. I am following a book Programming, Principles and Practice using C++ by Stroustrop. The following code is an exerci...
[4 replies] Last: well... I get it now. Before it comes to line number 17, the words ent... (by janbaztaimoor)
[code review] mode of integers
 
// Finds the mode of input integers #include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> data_elements; in...
[6 replies] Last: @lastchance Thoughtful! Thanks. (by chirumer)
Very new to programming! Need help with a for loop not working.
 
Hello, I've recently started programming and I've had lots of trouble figuring out why my code is wrong. I need to do a for loop, which asks the same question (...
[3 replies] Last: Thank you so much! After a bit of fixing it finally worked. I had trie... (by Luca4588)
Raptor FlowCharts
 
Need help with Raptor flowcharts, I will later need to write a C++ program that does the same thing. So far have input to string, a test if it is a number then ...
[5 replies] Last: I did a 'net search on RAPTOR Flowcharts ( https://duckduckgo.com/?q=r... (by George P)
by NMI21
Reading lines from txt file with calloc
 
Hi guys I dont have a specific code yet. I know how to read a txt file with fstream. I can implement a program which reads and gives out the lines. My question...
[2 replies] Last: I think there is a way to directly read text into a c++ string... han... (by jonnin)
how to get a specific text from string? #2
 
I don't do code much with c++ so here is a question I have with this string. string - param 1: CP:0_PL:0_OID:_CT: _ `6<`2Username``>`` `$`$Hello world!!```` ...
[3 replies] Last: I just now read my post again and I think I could've presented the iss... (by Reverseit)
Class A members depends on Class B members: how to? (1,2)
 
Hello everyone, i spot here from time to time when i come back to c++ development. I have a question: Assuming i have a class BackGround as follow: ...
[21 replies] Last: It sounds to me like the background object should be global. After a... (by dhayden)
Need help with a creation of student diary in C++
 
Hello, I'm struggling and desperately need a help with the following task. I don't have any idea at all of how to make the following program in C++. Could you p...
[2 replies] Last: In addition, once you have code to read from the file, create a functi... (by seeplus)
by NiceS
+2 instances overload
 
Im having trouble solving this error and does not know what does it mean. I tried this kind of code before but it does not have this error. When calling the so...
[4 replies] Last: If one goes to <algorithm>, then one could go to std::sort too: // So... (by keskiverto)
Can someone explain to me why my vector won't output?
 
int i = 0; int pop = 10000, stars_dscvrd = 0; int army = pop / 2; int pop2 = 10000, stars_dscvrd2 = 0; int army2 = pop2 / 2; int galaxy_stars = 4...
[11 replies] Last: I got it to work Note that "it works" is a frequent assumption. It... (by keskiverto)
Toggle, clear and set bits
 
I a) Toggles bit 11 in x. b) Clears all bits except bit 3 in x. c) Sets bits 0,1,2,3 in x. a) // toggles bit 11 in x x ^= 1 <<11; //******************...
[9 replies] Last: My favorite is my Apple Magic Keyboard. I have used several other typ... (by JRManx)
by alexas
collision detection - need advice
 
Hello It is a broad and yet very complex subject, at least for me, when I simply google it. I would benefit from anyone who could simplify or just give some goo...
[3 replies] Last: Are there any constraints as to where these cuboids can go? Use any co... (by Ganado)
Error with inheritance
 
Write your question here. //main #include <string> #include <cstdlib> #include <iostream> #include "Administrator.h" #include "salariedEmployee.h" u...
[3 replies] Last: vs code is a poor tool. Try the real visual studio (2019 current) and... (by jonnin)
May 2021 Pages: 1... 78910
  Archived months: [apr2021] [jun2021]

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