Permission denied

Pages: 123
Oh well, looks like it gives the same error under microsoft visual
Last edited on
Try codeblocks. I mentioned that earlier and works like a charm for me. I never had any problems building. Although I can't say I ever had a hard time building in any IDE.
giblit wrote:
I could be wrong on the link been a while since I downloaded
That was what I was using... ^^

Then you must have an old version of code blocks.. The newest is 12.11 and I have never had a problem running anything I built.
I have 12.11 also. I've looked in my Anti-virus and the weird thing is, all the infected files I had were the ones giving me trouble. Maybe my anti-virus deleted those .exe which caused the problem ? But still, I don't see why my anti-virus would begin doing this.
Ok, I think I have found the cause of my problem.

Everything begins because of this : string nom("x");

With string, everything messes up. Someone suggested me : string nom;

And it works properly.

Why is that ? Any help ! Thanks!
Then you probably just don't have c++11 enabled. Go to the compiler settings and under flags put -std=c++11 or -std=gnu++11
can't remember which one I am pretty sure its the c++11 one that works though.

That's c++11 syntax and you probably had c++98 before. If you want to use c++11 features you must enable it.
features such as initialization : variable( value ) , ranged-based loops for( const auto &it : CONTAINER ) , threads, int a[ 3 ] { 1 , 2 , 3 }; vs int a[ 3 ] = { 1 , 2 , 3 }; ect...
And all the problems I had with my .exe files going away was because of syntax ?

Also, last question, when I quit Codeblock, it says the perspective code block default has changed, do you wish to save it.
I dont know about the .exe but just hit yes on the codeblcok thing
Maybe the C++11 format in a different setting caused the compiler to write the exe file to a system directory to which you should not be privy to. Weird but it's just as weird as the compiler not spitting out an error from invalid syntax.

Also, I've always had that issue of my perspective changing ever since I started using github. I never see the change though.
So, would we say that my problem is half corrected ? It seems to only work in the new format you suggested me. The other way, and everything sh... down. The permission error, etc.

But hey, my thing works ! That was the goal ! Thank you
I think there was a clue given earlier. Your anti-virus program is detecting your executable program and giving a "false positive" as if it is malware.

There are several actions you can take. One is to report the false positive to the anti-virus software supplier. You should be able to send them a sample of your exe (the one causing problems) for them to analyse - purely from a malware perspective so they can stop generating this false positive.

Another action is to simply configure the anti-virus to treat your program as an exception and ignore it.

Lastly (and only if all else fails) you could ditch that anti-virus program and use a different one from another maker.
Last edited on
Topic archived. No new replies allowed.
Pages: 123