Beginners - April 2021 (Page 9)

Problem of scope of variables
 
Hi, I'm testing on a super simple code. However, I can't understand why isn't the output as expected. Below is my code: #include <iostream> using namesp...
[2 replies] Last: Right, got it! Thanks a lot:) (by calvinfornia)
How to Display Image in C++
 
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 it in...
[1 reply] : Which OS are you using? Which compiler / IDE are you using? Do you wa... (by salem c)
How to print out array in all caps
 
I'm working on a project for fun and was trying to figure out how do I capitalize whatever the user inputted in all caps? For example I want it to print NAME1...
[7 replies] Last: seeplus already showed you, you need some sort of helper function to c... (by Ganado)
I'm getting random character output
 
I can compile this code properly. But when I run it, the output has some lines like "►¶☻☺╚‼☻☺" this. Can you help me to solve this problem. ...
[4 replies] Last: Thank you guys so much, I need to read a little about your responses.... (by finternet)
Counting data input file
 
I am working on a program that has an input file containing a students last name, first name, and grade. What I need the program to do is count how many people ...
[2 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <s... (by lastchance)
dylib and how to use it
 
I want to use an external library I downloaded online. In the downloaded folder I have the following files: - libexternal.dylib - libexternal.h - libexternal...
[8 replies] Last: Ah, ok. Well that's good! (by JRManx)
C++ Sea Battle Game
 
So I've been handed a project with skeleton code in order to make a C++ battleship game but I can't figure it out. Just need help where it says "insert code her...
[1 reply] : Please use code tags. [co de] [/ code] around your code. Edit yo... (by Ganado)
Outputting addresses instead of dereferenced value
 
Hi, I'm just trying to write something simple up that will print out a polynomial. Issue I'm having is, if I print out the list of Term objects within the defa...
[4 replies] Last: Why is Poly derived from Term? As a base to start from, consider: ... (by seeplus)
What can i do with C++
 
Hi, I would like to start with a C ++ course, but first I would like to know: - what kind of applications can I make with C ++ - can I edit a Microsoft acc...
[4 replies] Last: Hey, So, the uses of C++ is unlimited and a few of them are as follo... (by Karthik Ram)
Right-center a string within another string?
 
Is there a way so that between two brackets that are a set distance apart, a string of varying length can be placed against the right bracket? For context, I a...
[1 reply] : You must edit your post and put the formatted text inside of [ output... (by Ganado)
Help with math functions
 
Background info: for every win is 5 points, every tie is 2 points, every loss is 0 points. i am trying to make a function that would add up all the points. ...
[5 replies] Last: Hello ellgoose, After guessing at the missing code and after making t... (by Handy Andy)
stl algorithms and collections in workplace?
 
Hello, I am currently learning pieces of the stl, but when I watch videos about coding interviews etc the person always say that you cant use the stl algorithms...
[7 replies] Last: Every reference I can find do say the standard itself doesn't use the ... (by deleted account xyzzy)
Finding data in an input file
 
Hello! I am working on a program that asks the user to type in a zip code and the program will go through a file and display the county for that zip code. T...
[19 replies] Last: Hello iUseCPlusPlus, Give this a try on "repl.it": #include <iostre... (by Handy Andy)
Deleting Content from a file
 
Hi, I am attempting to write a program will prompt a user to input there name and address. The program gives the user the option to insert information (by pres...
[4 replies] Last: Re-factoring the code into functions etc, perhaps something like: #... (by seeplus)
Small comma issue in output
 
Hello, I'm having a minor issue and it's bugging me. I'm supposed to ask the user for 10 numbers and then print their odd and even numbers inputted and then add...
[4 replies] Last: #include <iostream> #include <valarray> using namespace std; templat... (by lastchance)
Reading a text file and using delimiters
 
I have a text file which has the following format: "coffee Black coffee; Cappuccino; Latte; lasagne Chicken; Beef;" The format is name \n exampl...
[4 replies] Last: [quote=Ellen2001]my problem is that the struct 'Item' has to be a clas... (by lastchance)
by Profio
Countdown project help no getting an output
 
Hello everyone, Sorry if this is a really beginner question but I am struggling to figure out where I am going wrong. The question is to: - You need to make...
[3 replies] Last: Hello Profio, To the right of your code box is a gear icon with Edit... (by Handy Andy)
Dynamic Array Class and Functions
 
Hello! I'm doing a Dynamic Array class in which I have to do some statistical function to do some calculations. I'm trying to do one to calculate the Average of...
[12 replies] Last: No problem. Hope it all worked out! (by MikeyBoy)
by alexas
Passing by reference in the parallel
 
I have a simple function which works well and pass the value by reference called poli_intersecting_return. I am trying to use that function in parallel using th...
[4 replies] Last: Hmmm you are right, it does not work. But why? That kind of structure ... (by alexas)
Subscript Operator Overloading
 
Hello I need to build a subscript operator for my array of unsigned integers. I was wondering if the subscript operator variable type needs to be "unsigned int...
[2 replies] Last: Thank you! (by panconcafe)
April 2021 Pages: 1... 789101112
  Archived months: [mar2021] [may2021]

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