0

this is a very very basic question but while coding i got stuck.
in c++ we use the statement:

if (back_tracking(0, y + 1))

to check some condition but while coding in c# it says cannot convert implicitely int to bool!
anybody kindly tell me whats the workaround in c#

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by Momerath
1

In C, anything that is not zero is true, while zero is false. C# doesn't work that way and requires a boolean value for conditionals. So you need to compare that to something

if (back_tracing(0, y + 1) != 0) {
    // true, do whatever
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.