Beginners - August 2018 (Page 11)

by AL88
How can I make this return the desired float back to main
How can I make this code return the desired float in the if else section back to main?. At the moment it's returning 1 all the time. #include<iostream> ...
Aug 8, 2018 at 3:00pm
[5 replies] Last: Also how can I make it return the float properly, i.e. 4.0 points, no... (by Karakuik)
Asking for help
#Disclaimer: I am not asking code. I somewhat have an idea about this problem but unable to code it. If someone can give a little hint,then I would be helpful....
Aug 8, 2018 at 1:51pm
[1 reply] : https://www.codechef.com/codeofconduct Why do you ask a "Python 3.6" ... (by keskiverto)
Text File Isn't Working
I have a code and when I want to run it with the .txt file it wont give me the right output. How do i make the code read the output file of score.txt My code is...
Aug 8, 2018 at 12:36pm
[2 replies] Last: Hello katalinaisland, PLEASE ALWAYS USE CODE TAGS (the <> formatting ... (by Handy Andy)
Team work
Hi Guys .. i wanna work with someone in real c++ project (i'm still begginer)
Aug 8, 2018 at 12:12pm
[no replies]
please tell me what's wrong with my code it says--main.cpp:13:13: error: expected initializer before 'of
//============================================================================ // Name : vehicle.cpp // Author : vaibhav singh Bisht // Version ...
Aug 8, 2018 at 10:29am
[3 replies] Last: This is followed by the under score (_). Which should be avoided as t... (by MikeyBoy)
error: expected unqualified-id
please tell me what's wrong with my code i found this error error: expected unqualified-id while (Key = (TKey*)nextkey()){ TFile * file = new ...
Aug 8, 2018 at 7:47am
[1 reply] : Key and key are different! Look closely at UPPERCASE and lowercase. (by lastchance)
Problem with inheritance class
Hi everyone, I have a problem with inheritance: #include <iostream> using namespace std; class A { public: A(){cout << "aaa\n";} void foo() {cout << ...
Aug 8, 2018 at 7:41am
[2 replies] Last: Thank you, that was very clear and concise (by Song Tung)
Recursive function for an array?
Hello, what a good recursive function that run through an entire array or vector could look like? Assuming i have an array of words and i want to scan the arr...
Aug 8, 2018 at 7:21am
[12 replies] Last: @all thank you very much. Very interesting material to study. than... (by Amiplus)
by sirdar
How to load files into memory c++
I'm doing a program to management of directories and their contents and I want to run a program in determinate directory and load this directory and all the fil...
Aug 7, 2018 at 5:39pm
[5 replies] Last: Currently, you are setting your path, c, before you loop over readdir.... (by Ganado)
by AL88
Can someone explain how the arguments are being passed
Can someone explain to me how the variables base and powerRaised are being passed through calculatePower so I can have a better understanding of recursion and m...
Aug 7, 2018 at 5:33pm
[6 replies] Last: +Like tpb's answer. @AL88 to write your own recursive function, struc... (by icy1)
by Kai456
Expects/Ensures do not trigger breakpoints??
Hi Guys, I'm learning about pre and post conditions and how to apply them. I am told the Expect/Ensures macros from GSL are the way to go. As far as I unders...
Aug 7, 2018 at 5:23pm
[3 replies] Last: Thanks icy! (by Kai456)
by lachev
beginner question about functions
Hello there! I'm an absolute beginner in programming and C++. I'm learning about functions and wrote a piece of code, a small function with a random formula. ...
Aug 7, 2018 at 4:55pm
[5 replies] Last: Thank you guys for your valuable responses! I really appreciate it. (by lachev)
Another question by a begginer
/*HEllo everybody. i would like to see your recommendations and your quotes. how can i optimize this code? what is wrong into the code? what can it ...
Aug 7, 2018 at 4:06pm
[4 replies] Last: "My main recommendation would be to NOT stuff plain old functions ins... (by luciusFernatore)
How to count input arguments? (Beginners trying to learn C++ here, sorry for the long paragraph)
Hi, I am trying to count the characters from input argument phrase "Hello World 123.54", I have tried the following codes: int i = 0; for (i = 0; argv !=...
Aug 7, 2018 at 3:37pm
[8 replies] Last: I'd make the counting a separate method in whichever loop style you pr... (by icy1)
Why Integer with Double Digits is Not Looping Out
Solved. Codes removed to protect assignment copying.
Aug 7, 2018 at 3:26pm
[5 replies] Last: It's selfish of you. Really selfish since the OP openly admitted the... (by closed account E0p9LyTq)
by paulm
Strtok reset point
I have a piece of code that uses strtok_r to split an incoming string of decimals, separated by comma's, into an array of doubles. But I've noticed "strange" be...
Aug 7, 2018 at 12:30pm
[6 replies] Last: Solved. I though about it a few more times, but since I only have to c... (by paulm)
Modular GCD problem of codechef
Given integers A, B and N, you should calculate the GCD of A^N+B^N and |A−B|. (Assume that GCD(0,a)=a for any positive integer a). Since this number could be ...
Aug 7, 2018 at 6:58am
[1 reply] : Double post: http://www.cplusplus.com/forum/general/ (by Thomas1965)
Error - attempting to reference a deleted function
I have an error related to class - I am using Visual studio - It is saying the class was deleted but the function does exist. #include "stdafx.h" #incl...
Aug 7, 2018 at 3:37am
[6 replies] Last: Hello, The problem is resolved now and the algorithm is back running ... (by tghatem)
by AL88
Why is this returning 0 and not 30
Hi please explain why this is not returning 30 thanks #include<iostream> signed long Perimeter (unsigned short int, unsigned short int); int main() { u...
Aug 6, 2018 at 9:03pm
[3 replies] Last: Do you want a hand hold or a hint? Here's a hint first... Inside of yo... (by Karakuik)
the location of the maximum sum in a column
I need to add the columns and print which column had the maximum sum and the sum of that column. So I already added the columns and got down the max, but I c...
Aug 6, 2018 at 8:18pm
[5 replies] Last: Here is C version with 1-based indexing shown to user #include <stdio... (by icy1)
August 2018 Pages: 1... 910111213... 15
  Archived months: [jul2018] [sep2018]

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