C++, Progam Detection [closed] - c++

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I want to detect if a window/process is running, and if it does, to make the c++ program close.
Something like this:
if (FindWindow(NULL, TEXT("Fiddler"))) {
;
std::exit
;
}
It doesn't works for some reason.

WHy do you have random semi-colons floating in space?
This code should look like:
if (FindWindow(NULL, TEXT("Fiddler")) != NULL)
{
std::exit(0);
}

Related

my code says segmantation fault when i run it can someone help me? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
}
but when I run it it says segmentation fault and apart from that, I don't know if the code is correct.
You have a j++ at line 18 that was almost certainly supposed to be a g++. Also, your x+=g; on line 19 is probably supposed to be an x++. You only want to add one each time.

For loop fails, but code appears to be correct [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
My code looks fine to me, but I'm getting a syntax error in my for loop. Does anyone know why this would be the case? I've included my code below:
def printLine(numberOfDots):
dots = 0
for x in range numberOfDots:
dots += 1
printDots = print("." * dots)
return printDots
printLine(20)
range is a function, so you should use range(numberOfDots) instead of range numberOfDots.

Expected unqualified - ID _config [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
So I'm brand new to c++ and just started the beginner class. The professor has given us the exact prompt to put into the program and I am still receiving an error. I have checked over and over for any small flaws such as spacing or random ";" that a lot of people seem to do, but still no results. Can anyone see anything wrong with what I have down?
Remove asterisk (*) right below "//Purpose of this program ..." and try it again.

strange regex experasion [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I've got a quick harmless question...
what does this expression mean:
/(^|[\s\0])/g
Try it out on regex101.com, looking on the right side:
Hope you can see this ok and can grok it.

n-th root of a number [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am trying to write a program (c++ console application) that calculates the n-th root of a number, where the n and the number are input from keyboard, but I don't know how (sorry for bad English). Can someone please write this program for me so I can see how it's done. Btw I'm new to programing so please make it as simple as possible. Thanks
Best way I think
double NthRoot(double value, double degree)
{
return pow(value, (double)(1 / degree));
}
From here.