Beginners - March 2021 (Page 6)

Copying and modifying an array
 
I am copying and modifying an array elements {10, 20, 30, 40} my output:20 30 40 20 expected output: 20 30 40 10 How do I grab oldScores and display last in n...
[3 replies] Last: Thanks!! Finally working. (by kikiali)
ATM program for school
 
working on a program for school but i am getting an unidentified error but i cant figure out what i missed please help //bring in our libraries #include <iost...
[6 replies] Last: thanks, turns out i needed to put the functions at the bottom. moved t... (by saucefamdad)
How to show an image?
 
Hi! I'm trying to write a function in C++ to show an image on the screen. How could I do that? I have already created a .JPG image but I was unable to use i...
[12 replies] Last: I will present a counter viewpoint to Furry Guy's post (not trying to ... (by Ganado)
by solo88
first program
 
hello i'm new to programming in cpp i've written a small code that is a "pandemic calculator" my question is how can i make the infected number be equal to the...
[1 reply] : Without using windows.h: #include <iostream> #include <thread> #inc... (by seeplus)
push_back error
 
So, I'm writing a program that is supposed to take in a text file with a bunch of different types of questions and ask the user them. Kind of like a trivia game...
[2 replies] Last: As one file which compiles with no errors (but with warnings): #inc... (by seeplus)
by NiceS
The search function only work for the first code and anycode after the first is deemed as the item not found
 
#include<iostream> #include<fstream> #include<cctype> #include<iomanip> #include<cstring> #include<cstdlib> using namespace std; typedef struct { char code...
[7 replies] Last: Thank you all for the help the problem have been fixed. Have a nice da... (by NiceS)
week 2 of learning to program
 
Please don't bet me up to bad, I'm trying to make a loan calculator on my own for class. Ive manage to get everything to calculate correctly except the monthly ...
[3 replies] Last: Hello NewGuy76, If this is a class assignment it really helps to post... (by Handy Andy)
read a binary file and place into a linked list
 
I have an assignment that asks me to create a program that when executed will read a binary file and place the information into an ordered linked list. The user...
[3 replies] Last: will read a binary file and place the information into an ordered lin... (by seeplus)
std::is_permutation to isnot_permutation
 
I'm in need of the opposite of is_permutation. So I looked at the c++ reference and saw this in regards to is_permutation. template <class InputIterator1, c...
[4 replies] Last: THANKS!!! Appreciate it! Brian (by Brian845)
Hangman program (1,2)
 
Hello, so i am writing a program of hangman but have a few problems that i cant find to solve for i have the right steps but dont know how to resolve the issue....
[23 replies] Last: Yep, I know they have a version for Mac but yeah, like you said it doe... (by JRManx)
by Spauli
How to print a beautiful matrix?
 
How can I print a beautiful matrix with c++? In the moment I'm uesing this code: void print_matrix(double M ,int n, int m){ for (int i=0;i<n;i++){ cout <...
[11 replies] Last: Thanks man (by Spauli)
Future Release Question
 
If a release of C++ was released in 2098 what would it be called. We could not call it C++98 because that release already exists.
[3 replies] Last: If a release of C++ was released in 2098 I can't wait! 100 years of... (by mbozzi)
Question about fstream class and line break
 
Here is my simple code. int main() { fstream fs("config.txt", ios::in); string s; while (!fs.eof() && fs.good()) { fs >> s; cout << "s ...
[10 replies] Last: Just remember to always test after a file operation, not before. ge... (by seeplus)
by bstroe
Numbering from 1
 
#include <iostream> #include <cstring> using namespace std; int main() { char s1 , s2 ; cin >> s1 >> s2; char *p = strstr(s2, s1); while (...
[3 replies] Last: Using c-style string: #include <iostream> #include <cstring> using... (by seeplus)
Could anybody please tell me why this programme won't work
 
Write your question here. I can't figure out what's wrong, so could any of you please help me. Thank you all in advance here is the code #include <iostream> us...
[3 replies] Last: Thank you a lot! I really appreciate this :)) (by missesIrby)
Initializer and declaration error
 
So the error comes up at "void read()" it says "expected initializer before ‘void’" im quite new to cpp and need help on this one. thanks beforehand ...
[4 replies] Last: Thank you. you people are amazing! i appreciate it. (by somecuriousguy)
Programming Assisgnment Help
 
I need help im trying to get my output to read like this attachment. https://ibb.co/Zcw3Bw5 #include <iostream> #include <ctime> #include <iomanip> #inc...
[4 replies] Last: #include <iostream> #include <sstream> #include <string> #include <ct... (by lastchance)
by mpg
Polibio cryptography with c++
 
Can you help me how create Polibio cryptography with c++ ? Many thanks!! https://www.cmswiki.net/risorse-sviluppo/codice-poligrafico-la-scacchiera-di-polibio ...
[6 replies] Last: That code you found on the internet isn't even correct. It converts i ... (by dhayden)
by kg88
Trying to use a set to generate a list with nonduplicate words( ascending). It works until list needs to display in console.
 
I'm not quite sure what is wrong with why the text file I put is not showing up in the console. I don't have to have them in ascending order, but at the very le...
[12 replies] Last: Thank you so much! That is exactly what the problem was. Thanks Furry... (by kg88)
Aggregation and composition
 
Hi! I'm learning composition and aggregation and I've got some problems with the latter. Here is my code #include <iostream> #include <locale> using ...
[2 replies] Last: Yes, you are right, Ganado! It wasn't a good isea to make it static. W... (by crueltyfree)
March 2021 Pages: 1... 45678... 13
  Archived months: [feb2021] [apr2021]

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