w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
List of rivers by continent is given. Find average length of rivers on chosen continent. C++

In this line

if (river[i].continent == u)

you are comparing two char* pointers (wich will never have the same value for sure).
You probably want to do

if (strncmp(river[i].continent,u,sizeof(u)) == 0)

to check if the character arrays pointed have the same content.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.