Answer the question
In order to leave comments, you need to log in
PC freezes, what should I do?
Here such a thing, the PC completely freezes during the game or while watching the video, only the relog helps ...
It so happened that when playing csgo with reduced settings, it does not freeze, but when playing Dota2 it completely refuses not to fall .. .Passed tests maximum CPU temp.,RAM and victoria447 harsh prog rules, didn't reveal any problems...
Windows 7 Service Pack 1 build 7601 (64-bit),
1 x Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00 GHz,
4.0GB RAM,
NVIDIA GeForce 9800 GT,
596GB
HDD
Answer the question
In order to leave comments, you need to log in
Check for overheating of the video card, for example using FurMark .
Make sure the power supply has enough power. Your video card consumes up to 105 watts, the processor - up to 65, mainly on the 12V bus. That is, the power supply on each of the 12V channels must produce at least 9A, and preferably 12A.
Why doesn't return work? 10 will be displayed on the screen, not 20 (as intended.
You need to pass the argument by reference:
function my_func (&$a){
$a += 10;
}
$a = 10;
my_func($a);
echo $a;
Why doesn't return work? 10 will be displayed on the screen, not 20 (as intended.
my_func($a)you need to assign the result to something, for example like this:
$a = 10;
$result_sum = my_func($a);
1.
my_func($a) - you just called the function you passed the argument to. Its result, which is returned by return, you do not use here, so $a does not change for you.
Need
$a=my_func($a);
2. No need to name variables with one letter - you will get confused yourself as soon as there are 10-20 of them in the program. write like this
function my_func ($arg) {
return $arg + 10;
}
$myVariable = 10;
$result = my_func($myVariable);
echo $result;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question