Trying to sort an array of Integers and after some googling, came across the solution using std::sort
accompanied by this error: namespace "std" has no member "sort"
.
Just to disqalify any qualms that I'm not using the std namespace, here is my header:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
Add:
#include <algorithm>
as stated in the std::sort()
reference page.
See Using std Namespace, Why is "using namespace std" considered bad practice? and many other questions on SO discussing using namespace std;
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With