Beginners - March 2019 (Page 22)

A problem.
So, this may make me seem VERY slow(Heh, I kinda am...), but, I can't figure out how to start coding on here. Could I please get some help?
Mar 5, 2019 at 7:34pm
[4 replies] Last: Okay, thank you, I get it a little bit more!! (by Mercious00)
Help With Make
I am using OSX and want to compile and use the libraries from this GitHub repo https://github.com/nmoinvaz/minizip - I have downloaded the repo and cd into the ...
Mar 5, 2019 at 7:17pm
[9 replies] Last: IDEs (Like NetBeans, Visual Studio, etc.) will often use their own "wo... (by Ganado)
Max value
Hey! I had to write a code to display 20 temps in an array and then get the max and min values. My min value is correct but max isnt even close what could the p...
Mar 5, 2019 at 6:47pm
[3 replies] Last: Thank you! Also I individually wrote each because when I did just n ... (by Mahnard)
Passing Pointers
Q.) I did just pass the pointer into the function, and it did work only within the function. In main, the pointers were not swapped. So, I eventually tried to ...
Mar 5, 2019 at 5:34pm
[6 replies] Last: Thanks !! I did not know that ... (by rhamm5798)
Can cin.fail() be used to detect non integer inputs?
I want to check if an input is a number or not, and only accept it if it is. int a; do{ std::cin>>a; if(std::cin.fail())std::cout<<"gib number\n"; }...
Mar 5, 2019 at 5:00pm
[1 reply] : Well it would, but you need some way to get rid of the bad input as we... (by salem c)
by jesi
Shorten my code, i want to compare my work to yours.
any idea on how to shorten this code? #include <iostream> using namespace std; int main() { int num1, num2, num3; cout << "Enter three ...
Mar 5, 2019 at 3:35pm
[4 replies] Last: @ jesi So far, yours is the cleanest code here that doesn’t change ... (by Duthomhas)
why cant i modify the value of a (private) member variable
i can not change the value of "int index" no matter what i try i have tried thus far using 1)index++ 2)this->index++ 3)using a set_index() fucntion 4)chang...
Mar 5, 2019 at 3:25pm
[3 replies] Last: @dutch thanks for tips @jonnin the issue was from outside the class ... (by Kallinteris Andreas)
by yat89
Splitting/dividing vector
Hi everyone. I would like to ask. I got a task to split or divide vector and copy it into new vector. I don't have idea how to do it. Is there any ways to do it...
Mar 5, 2019 at 3:02pm
[3 replies] Last: Hi nuderobmonkey and keskiverto, Thanks a lot for the help from both ... (by yat89)
by RahRah
validating marks
Were am i going wrong with the if else statement.It is not validating the marks wether they are above 60% and if the candidaate qualifies for the bsc comp scien...
Mar 5, 2019 at 1:46pm
[8 replies] Last: [quote=RahRah] explain This part if ( *min_element( mark, mark + examm... (by lastchance)
by Hajo93
QT insert pic
I want to insert a photo into a label on QT QPixmap pix("C:\Users\haral\OneDrive\Documents\NY\Nyeveier.jpg"); ui->label_Pic->setPixmap(pix.scaled...
Mar 5, 2019 at 1:09pm
[4 replies] Last: Example (assuming you have created the *.ui): main.cpp: #include "W... (by Enoizat)
std::array with non-compile-time-constant
Is it possible to initialise an std::array with a non-compile-time-constant? Or is the only option to use a vector? std::array<std::string,people> names;...
Mar 5, 2019 at 12:21pm
[2 replies] Last: Thanks (by calioranged)
by RahRah
If else not responding
The if else part is only picking one situation and not the other were am i going wrong.it is meant to select one option and then give results using the overload...
Mar 5, 2019 at 10:16am
[4 replies] Last: thank you so much for the assisstance (by RahRah)
input
I wanna to give two input file to my code.How do it? Why this is not correct? while (input) { input.getline(str , 255); input.getline(coef...
Mar 5, 2019 at 9:52am
[13 replies] Last: @coder777 Thanks. I find my mistake. Now code work correctly. (by jasper hall)
toupper();
I have a palindrome function that returns true if a word can be spelled the same way backwards as it is forward. The function works but I need to make it so it ...
Mar 5, 2019 at 9:50am
[2 replies] Last: This line is pointless - why write out the same thing each pass throug... (by lastchance)
by Ceche
C question
In a program I am working on, I put this on accident: float *coefficients = malloc(number_coefficients*sizeof(float)); instead of this: float *coeffi...
Mar 5, 2019 at 9:18am
[2 replies] Last: > or is there some kind of implicit casting going on that makes the fi... (by salem c)
Unhandled exception
I have a code like this: #include <iostream> #include <fstream> using namespace std; struct Fraction { int nu, de; }; void Enter(Fraction *&f, int...
Mar 5, 2019 at 6:08am
[6 replies] Last: Oh thank you. Now the output is correct. Have a good day! (by thinhphucvang)
by kenken
Using a function of type bool as a condition for while loop
I get error (C++ forbids comparison between pointer and integer) when i used a bool function as the condition in a while loop. Can someone please help me. The ...
Mar 5, 2019 at 4:48am
[1 reply] : Like this. do { } while ( again() ) (by salem c)
Tax form project
I have a program i have to do as a income tax form and I honestly do not know how to structure the if/else statements and really need help writing it ASAP. I...
Mar 5, 2019 at 4:47am
[9 replies] Last: . (by salem c)
by Houd
Weird Inequality
I saw some weird code lately, it looks something like this: bool mybool = 1; int myint1 = 2; int myint2 = 2; mybool = myint1 != myint2; cout << mybool...
Mar 4, 2019 at 11:25pm
[2 replies] Last: Ah, That makes sense now, thanks. (by Houd)
For loop isn't working properly
Im trying to write a nested for loop that gets the data from an input file. The for loop will check the student and the 3 courses they are taking the 5 test fro...
Mar 4, 2019 at 11:16pm
[7 replies] Last: Hello dbarclay100, In testing the new code I found the line 109 works... (by Handy Andy)
March 2019 Pages: 1... 202122232425
  Archived months: [feb2019] [apr2019]

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