Doubt about code in C

Hello people I'm new in this. I'm trying programing this code but is saying me "Error: expected unqualified-id before if"

And my code is this:

if (ign.ignited())
{
forAll(ign.sites(), i)
{
const ignitionSite& ignSite = ign.sites()[i];
if (ignSite.igniting())
{
forAll(ignSite.cells(), icelli)
{
label ignCell = ignSite.cells()[icelli];
if (T[ignCell] < 2000.0)
{
Info << "Igniting cell " << ignCell << endl;

// do whatever....here we just increase the enthalpy in the cell
scalar magH = mag(h[ignCell]);
h[ignCell] += ignSite.strength()*magH;
}
}
}
}
}




Anybody knows what's wrong?

Thanks
Is forAll some sort of macro? Also please use code tags you can edit, highlight your code and press the <> button on the right. Also does ign.sites() and ignSite.cells(); return a pointer?
Last edited on
Did you install the library and do everything else it said or just copy/paste the bottom part that you thought would work for what you are trying to do?
I created the files and copy and paste the codes and then i compile. And when i'm compiling the ignite.H file givi-me that error
Did you do everything it said or just create the files it said to and put in their code?
Yes i follow each step
Topic archived. No new replies allowed.