Thanks for the suggestion, I'll have a look :)
Type: Posts; User: Daikon
Thanks for the suggestion, I'll have a look :)
Thank you, it's much clearer, but this second part with the brackets isn't so for now I'm gonna ignore it :P
As I'm reading "Jumping into C++" and liking the way it is written, I've come across a point that I don't think I understand properly. It says:
assigning an array to a pointer:
int numbers...
Thank you for your answer but seeing as how I'm a beginner at this, I'm trying to work out the code by myself to better my skills and understanding :)
Thank you for your answer, I took your advice and made one loop without calling the function findSmallest, just making sure the condition of the next element being smaller is respected. It works like...
This program should detect if an array of values (here 5 values of the user's choice) is sorted and if it's not then it should sort it. The problem is my "detection" function sorts every array and...
I honestly don't know what happened :biggrin: I restarted codeblocks, pushed F9 as before and now it works... Thank you either way :o
So, my program picks randomly a number between [1, 100] and I'm trying to implement a binary search algorithm to find that number. The problem is, nothing happens when it compiles it only says:...
Man, thanks a bunch, I don't know how I missed it :D
#include <iostream>
#include <cmath>
using namespace std;
bool IsDivisible (int number, int divisor)
{
return number % divisor == 0;
}