Beginners - December 2020 (Page 9)

Need to break out of the IF statement
I need the code to go back to the beginning of the program after the User inputs Y in the IF statement. Every thing else in the code works fine I just cannot fo...
Dec 8, 2020 at 12:05am
[3 replies] Last: OK thank you so much. Sorry I am just learning how to program and I do... (by bitcyknw)
by AymanA
what is the wrong !!!
Hello, This my 1st day in c++ , I just trying to learn while stay at home quarteened as I infected by cov-19. I wrote the below code and something wrong wi...
Dec 7, 2020 at 11:02pm
[3 replies] Last: Hello AymanA, PLEASE ALWAYS USE CODE TAGS (the <> formatting button... (by Handy Andy)
two '\n\n' ?
Why does using '\n\n' print a number rather than giving two newlines? One '\n' prints me a newline, using double quotes like "\n\n" gives two newlines but '\n\n...
Dec 7, 2020 at 10:28pm
[2 replies] Last: ah ok, I understand. I should have been able to figure that out. ' ' i... (by DonnaPin)
C++: while/if and return problem
Hi, I have a struct. User can decide do he want to print so there is cout << endl << "Want to print? (1. yes, 2. no, 3. quit) "; cin >> i.Print; ...
Dec 7, 2020 at 5:56pm
[10 replies] Last: Missing {} in the while If there are no parentheses the loop will do ... (by czerwonymoskit)
Need Help in c++ program
I made a program in which decimal is converted into binary . Now I want to store each bit in an array and add both binary numbers and store in separate memory ...
Dec 7, 2020 at 5:04pm
[1 reply] : Your third for loop seems to overwrite the arr array, removing the... (by Hezigon)
template function
hey lads, Need your opinion over here, for example we've got a structure with some elements in it struct { char a ; char b ; int ab; int abc; }A ; if I want...
Dec 7, 2020 at 4:24pm
[5 replies] Last: @jonnin, thank you ! really helped (by MaxGreen)
by CeErre
for Statement Issues - noob issues
Hey guys, I can't get my output on the format below. HELP! Whats the issue with my code? CeErre What is the speed of the vehicle in mph? 40 How man...
Dec 7, 2020 at 4:14pm
[7 replies] Last: SeePlus; That worked perfectly! Truly grateful! Thanks for the tips o... (by CeErre)
Resto bar shopping in c++
Hey guys, could you guys help me I just a newbie in coding and my teacher said that my code is too long and I failed the part that should be a calculation for...
Dec 7, 2020 at 4:10pm
[2 replies] Last: Have you studied classes/structures yet? The use of std::vector/arra... (by jlb)
Online Toyota Cars Shopping
Hi everyone, I'm having big trouble with this code it seems like there are unnecessary variables I've used, and the whole point of shortening the code it's my p...
Dec 7, 2020 at 2:19pm
[2 replies] Last: Not really a tip for shortening your code, but I will say you should m... (by Ganado)
Finding minimum value after iterations
Hello everyone, I am quite newly learner of C++ and I need a help for a small problem. I find a value , which is -250 , after some calculations. What I need...
Dec 7, 2020 at 1:56pm
[4 replies] Last: @JLBorges, thank you so much for your reply. I had thought maybe we co... (by learner999)
Using Merge Sort With Struct Array
Help me. #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; typedef struct { string tarih; float deger; }divide_and_co...
Dec 7, 2020 at 12:36pm
[7 replies] Last: Compiler complains: In function 'void merge_sort(divide_and_conq_dt*,... (by ElusiveTau)
Simple coding
Hello, I need to do a simple coding for a school project but the teacher says nothing and I got nothing so I thought maybe you can help me guys. Heres the assig...
Dec 7, 2020 at 12:07pm
[4 replies] Last: This is 1). It will read in numbers from the file and put them in the ... (by seeplus)
half dia pattern
I'm having problem to the lower part of the half diamond it is not really in place as is. #include <iostream> using namespace std; void halfDiamond(i...
Dec 7, 2020 at 11:54am
[2 replies] Last: Good day, Handy Andy. Dang! I am sorry I forgot that I have made a to... (by seghrein2300)
by sinatt
undefined reference to functions
Hi, I've actually checked everything many times. I really don't know where the problem is! Errros: undefined reference to `read(std::istream&, Student_info&)'...
Dec 7, 2020 at 8:59am
[10 replies] Last: @salem c Yes your hint made my mind regards (by sinatt)
Array addressing and testing
I am trying to make a program that takes the name of a restaurant and the ratings for that restaurant (out of 5 stars) and displays how many people gave the res...
Dec 7, 2020 at 5:11am
[2 replies] Last: > I thought there was a way to address each index in the array individ... (by JLBorges)
LNK2005/LNK1169: one or more multiply defined defined symbols found
Edited: It seems there is a protocol for putting free functions in header files I've created a Visual Studio project to collect and organize some scrap code/...
Dec 7, 2020 at 4:46am
[7 replies] Last: Hi, One generally shouldn't put implementation code in a header file:... (by TheIdeasMan)
by Ganado
Program to sort data crashes, don't know why
This is my program: #include <iostream> #include <string> #include <vector> #include <algorithm> struct Foo { int version {}; long long seconds {}; ...
Dec 7, 2020 at 4:17am
[10 replies] Last: You're absolutely correct. I kept halving my input data in two until I... (by Ganado)
by kmlz
Help For Simple Moving Average
i have some datas in data.txt ex:1,3,5,7,8,18,4,1,4,3,5,7... and i need a variable, (cout<<"enter a number"; cin>>n; ex:3 -- n=3 Result ={1} //(1)/1 Result =...
Dec 6, 2020 at 5:07pm
[12 replies] Last: Consider: #include <iostream> #include <algorithm> #include <fstrea... (by seeplus)
by Melo
Coordination System in console
Hi, I am relatively new to programming. I want to give out a simple Coordinstion system on the console with one Point in it. So i would ask the user to giv...
Dec 6, 2020 at 2:05am
[2 replies] Last: It's one of those feedback systems that help keep something balanced, ... (by Ganado)
change descending order to ascending.
How can I change the order of 'Name' to start changing from bottom to top, or ascending order. #include <iostream> #include <string> using namespace std...
Dec 6, 2020 at 1:20am
[18 replies] Last: Thank you, seeplus. I'm done with the said program. (by seghrein2300)
December 2020 Pages: 1... 7891011
  Archived months: [nov2020] [jan2021]

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