1
#include "stdafx.h"
#include <iostream>
#include <assert.h>

using namespace std;

class A
{
public:
    int IsLocked();
};
int A::IsLocked()
{
    return false;
}

int main()
{
    A a1;
    ASSERT(a1.IsLocked());
    return 0;
}

getting error as assert identifier not found.... I tried including also..

1 Answer 1

7

Should be:

assert(a1.IsLocked())

note lower case.

Sign up to request clarification or add additional context in comments.

1 Comment

Additionally, the assertation will fail, as a1.IsLocked() will return false. That may be intentional, but I figured I'd mention it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.