Beginners - April 2020 (Page 4)

by itb99
Simple Array program to display sum in array
#include<stdio.h> void main() { int i ; int arr ; int sum=o; for (i=0; i<=4; i++) { printf (“enter %d element \n”, i+1); scanf (...
Apr 26, 2020 at 3:55pm
[3 replies] Last: The for loops at lines 7 and 12 are making the array go out of bounds,... (by deleted account xyzzy)
String array and txt file
Hi guys, I need some help. I don't know how to store ONLY the words without the punctuations or other symbols from a txt file. . . . w...
Apr 26, 2020 at 11:03am
[1 reply] : You should write a function to remove the punctuation from a string. A... (by thmm)
Struggling With OOP and Vectors (1,2)
Hi, I currently know a bit of C, and i thought as I am off work on furlough I will learn some C++. I have created a basic airline booking system that output...
Apr 26, 2020 at 9:23am
[28 replies] Last: Many thanks for all you help. I will work through it and try and unde... (by RocketMan46)
printf Matrices from a .txt file
I have a text file with the following two matrices: 3 2 5 1 9 5 7 6 3 2 4 2 1 8 6 9 I need to get the program below to read the first two n...
Apr 26, 2020 at 8:43am
[10 replies] Last: @OP, You can read the first two values like this. #include<stdio.h> ... (by thmm)
by Tazzz
Dev c++ //How do i open it?
is like a list of commands... imgur.com/a/sk4mwgv It is like a list of commands, I just started in dev c ++ a few days ago and by accident I opened that lis...
Apr 26, 2020 at 8:36am
[2 replies] Last: i love u <3 thx (by Tazzz)
by gVd9
Cooking ribs
How can I make a program for cooking ribs in the pan? You have to enter the cooking time and number of ribs you want to be in the pan.
Apr 26, 2020 at 2:52am
[5 replies] Last: "How can I make a program that does stuff? You have enter the time pe... (by TheToaster)
Repeating Similar Code with Different Results
Howdy! I'm currently in the process of making a fast character generator for D&D DMs. Thus far, I've gotten the code to generate the numbers that one would nee...
Apr 26, 2020 at 2:36am
[2 replies] Last: This is incorrect syntax: if (RN1 < RN2, RN3, RN4) Presumably you... (by dutch)
search array
when I choose number 4 from the menu below the search function outputs -1. what am I doing wrong? #include <iostream> #include<string> #include<fstream> usi...
Apr 26, 2020 at 12:16am
[5 replies] Last: ahh I figured it out. get rid of the ! before titlefound and it works... (by bigskit13)
Using functions for same output
I was hoping to get an explanation on where to begin on changing the following code to be used with functions. I tried many things but everything seems to not c...
Apr 25, 2020 at 10:49pm
[2 replies] Last: well, making stuff global is not the way to go. lets give average a t... (by jonnin)
by Esso
Function return
This func. calculates factorials what I don't understand is how it keeps the values 5*4*3*2*1, while else says return 1, who it doesn't store 1 that coming fro...
Apr 25, 2020 at 9:15pm
[13 replies] Last: I guess I got it right now, I just try to understand every single tin... (by Esso)
English to Pig Latin Program errors
Hello! I am trying to write a program that inputs a short phrase from the user and outputs the Pig Latin conversion of the inputted phrase. I have looked up the...
Apr 25, 2020 at 8:27pm
[3 replies] Last: TheToaster, I really appreciate your insight and links to other posts ... (by agrace1024)
by Luigi1
Unicode characters
Hello, A friend of mine is taking his first steps on the language C and is using Dev C++ as compiler. He started to write a very simple program that shows ...
Apr 25, 2020 at 6:16pm
[1 reply] : This might be the reason. If the current font is a fixed-pitch Unicod... (by Thomas1965)
Possible to continue count past first int found?
Is it possible to continue counting the key past the first time int is found? the key appears in this specific document 3 times I would like to access the th...
Apr 25, 2020 at 5:46pm
[10 replies] Last: Thank you so much! Coding is so detail-oriented that even the slightes... (by closed account iT5o8vqX)
String replacing Hangman
Hangman code, I need to replace all asterisks where letter is present, not just the first one. Also when I guess the correct letter, it still adds one to my gue...
Apr 25, 2020 at 5:02pm
[2 replies] Last: for ( k = 0; k <= str1.length(); k++ ) Looks like a buffer overflow ... (by jlb)
by Chad9
Odds/Evens numbers
Hello can you help me with one program in (C++) I have to do program which have to say is there any odd and even numbers. I have to enter tree numbers. Examp...
Apr 25, 2020 at 4:51pm
[4 replies] Last: Actually the OP wrote: I have to enter tree numbers. so I thought... (by lastchance)
Variable not acting as expected?
I am trying to learn C++ and currently constructing a program which will list the divisors of a number that is entered. I am not worried about loops or making...
Apr 25, 2020 at 4:21pm
[14 replies] Last: Might I also suggest the following correction: #include <limits> //.... (by TheToaster)
Transpose of matrix (15x10) using vector of vector
Hello! I wanna display the transpose of a (15x10) matrix but I'm encountering a few errors that I can't seem to fix. Here are my progress so far #include <...
Apr 25, 2020 at 4:13pm
[9 replies] Last: This is how your function headers should look like: void generarMatri... (by TheToaster)
Templated copy constructor
How can I make a class use a template copy constructer over the compiler generated default copy constructor? struct test { test() = default; templat...
Apr 25, 2020 at 3:53pm
[5 replies] Last: I still don't see why this code is an error: struct test { test(... (by KishoreG)
Counting Even and Odd Numbers
Hi I am currently in an intro to c++ course and got this for an assignment. I know how to check if a number from a text file is even or odd but I don't know how...
Apr 25, 2020 at 2:31pm
[10 replies] Last: Okay Thank you so much (by YoungProg19)
Vector Iterator
Hi, im kinda new to C++ and im trying to understand what the vector iterator actually does, i dont get the meaning of it and dont see alot on the internet about...
Apr 25, 2020 at 12:55am
[3 replies] Last: https://stackoverflow.com/questions/5606973/understanding-iterators-in... (by deleted account xyzzy)
April 2020 Pages: 123456... 20
  Archived months: [mar2020] [may2020]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.