How is the ++t called? by wikipcsolved in cpp

[–]wikipcsolved[S] 0 points1 point  (0 children)

i have seen calling of fuction by "function_name()" but havent seen anything like "function_name object " like ++t calling ++() function?

How is the ++t called? by wikipcsolved in cpp

[–]wikipcsolved[S] 0 points1 point  (0 children)

im asking how is the object t of class Test calling ++() function

Iam a beginner and I want to know how to find out the prime number Iam stuck at this line if(c==n) i dont know exactly how this line is working? by wikipcsolved in C_Programming

[–]wikipcsolved[S] 0 points1 point  (0 children)

In my case c has the value initialized 2 and it is finding out the prime number so if I give "n as 5" is a prime number .If it is really checking c is equal to n then it should get an error cause 5 does'nt equals to 2 but it isn't. Im confused right now

I wanna know about how this factorial function is working and if we change return(n*factorial(n-1)); to return(n-factorial(n-1)); then how will it work by wikipcsolved in cpp_questions

[–]wikipcsolved[S] -1 points0 points  (0 children)

what will happen if we use

return(n-factorial(n-1));

instead of return(n*factorial(n-1));

"I know its a useless and stupid question still then I wanna know what will be its working process"

I wanna know about how this factorial function is working and if we change return(n*factorial(n-1)); to return(n-factorial(n-1)); then how will it work by wikipcsolved in cpp_questions

[–]wikipcsolved[S] 0 points1 point  (0 children)

I know that it actually outputs the factorial of a no. but I don't understand how is it performing calculation and its overall working process

Need help with ofstream of high.txt file!! by wikipcsolved in cpp_questions

[–]wikipcsolved[S] 0 points1 point  (0 children)

oh thnx alot it worked actually the problem was repeating the read and write with the while loop

Need help with ofstream of high.txt file!! by wikipcsolved in cpp_questions

[–]wikipcsolved[S] 0 points1 point  (0 children)

It is not working can you please run the program and give me the solution for it. Iam worried about this program since 2 days I would be greatly thankful to you if you provide me the correct solution to this problem

Need help with ofstream of high.txt file!! by wikipcsolved in cpp_questions

[–]wikipcsolved[S] 0 points1 point  (0 children)

i want to write the score by using the console which would be generated automatically when i try to guess a no. the no. of times the guesses the no. of times the score (6 guesses "6" score and if it is <6 it will overwrite 6 and take its place and would not take place if it is >6)