[Solved] c++ pointer void function issue [closed]

circleType::setRadius; double radius = circle.getRadius; The first line doesn’t do anything. The second line tries to set a variable of type double equal to a function. Perhaps you want to call these functions? This is what non-operator member function calls look like in C++: double area = circle.areaCir(radius); double circumferance = circle.circumCir(radius); circle.printCir(circumferance, area); So … Read more

[Solved] How to find the computational geometry of circles and rectangles using x and y values in c++? [closed]

In a header: someType MyFunc(someType1 var1, someType2 var2); //notice the “;” at end someType is the type of what the function returns, for example double. Same goes for parameters. For example double MyFunc(int var1, double var2) In the source someType MyFunc(someType1 var1, someType2 var2) { do something with var1, var2 return something of type ‘someType’ … Read more

[Solved] Python sorting algorithm [closed]

You had some error about your indentation and element word, it was element def copy_sort(array): copy=array[:] sorted_copy=[] while len(copy)>0: minimum=0 for element in range(0,len(copy)): if copy[element] < copy[minimum]: minimum=element print(‘\nRemoving value’,copy[minimum], ‘from’,copy) sorted_copy.append(copy.pop(minimum)) return sorted_copy array=[5,3,1,2,6,4] print(‘Copy sort…\nArray:’,array) print(‘copy :’, copy_sort(array)) print(‘array’,array)` 1 solved Python sorting algorithm [closed]

[Solved] strcmp in a function in c++ [closed]

You can’t insert boolean conditions into the function this way: if (!strcmp( yn , “y” || yn , “Y”)) change the conditions to first evaluate the boolean result of the functions and then perform your logical comparison if (!strcmp(yn , “y”) || !strcmp(yn , “Y”)) Also notice that you’re missing #include <cstring> to use strcmp … Read more

[Solved] Program crashes when a function returns empty

The main problem I see with your code is the reading loop, it has mainly two issues Read: Why is while (!feof(rPtr)) always wrong. You must check the return value of scanf(), and prevent scanf()‘s from overflowing the destination buffer, so the loop condition should be while (fscanf(rPtr, “%14s%lf%lf%lf”, fromDb.name, &fromDb.dArea, &fromDb.dLength, &fromDb.dFormFactor) == 4) … Read more

[Solved] JS comparing innerHTML

let pick1 = openCard; You redeclare pick1 inside the function. This creates a new variable that masks the global variable of the same name. Each time you run the function, you get a new pick1 and a new pick2, both of which are undefined. Consequently, you’ll always hit the first half of the if/else. Remove … Read more

[Solved] how do I use this remote download file in PHP? [closed]

This is all the code you need with the function: $url = “http://dev.icalapp.rogersdigitalmedia.com.rogers-test.com/Team+Calendar.doc”; $dir = “testing”; downloadRemoteFile($url,$dir); Also the target directory ($dir) should be writeable. And your webserver must allow outbound HTTP connections. 1 solved how do I use this remote download file in PHP? [closed]