[Solved] Header functions

Assuming that “didn’t work” means “didn’t affect the ScreenArray in my MonitorArray“, it’s because getScreen returns a copy of the array element ScreenArray MonitorArray::getScreen(int arrayPointer) while the new member function most likely works with the array directly. You’ll need to return a pointer to the array element instead: ScreenArray* MonitorArray::getScreen(int arrayPointer) { if (arrayPointer<0 || … Read more

[Solved] Is it possible to run scanf like this? [closed]

I think this is what you are trying to do: int main() { int numList[5]; int i; for(i = 0; i < 5; i++) { printf(“Input number %d “,i); scanf(“%d”,&a[i]); } printf(“Your numbers: “); for(i = 0; i < 5; i++) { printf(“%d, “,a[i]); } printf(“\n”); } The method that I used for printing is … Read more

[Solved] Cannot group strings correctly if use IEnumerable.GroupBy in C# [closed]

To really make sure it comes out as you want it, you could do it like that: var val = val1 .GroupBy(f => Path.GetFileNameWithoutExtension(f)) //group by filename .OrderBy(group => group.Key); //here’s the “Sort” foreach (var group in val) { var q = group.OrderByDescending(f => Path.GetExtension(f)); //order the filenames for outputting foreach (var f in q) … Read more

[Solved] basic python syntax [closed]

A C struct can be packed into flat binary data, which is what Python 2 calls a string. The struct module lets you take a string that represents one of these C structs, and “unpack” it into a Python data structure. To do so you call struct.unpack. You need to specify a format string (as … Read more

[Solved] Need php script just like used by mysmartprice dot com on Go To Store button (URL Cloaking) [closed]

I’m not 100% sure if I got your question right, but this is my guess of you mean: Use PHP’s header method like this: <?php if(!isset($_GET[“p”])) exit(“No parameter \”p\””); $p = $_GET[“p”]; header(“LOCATION: $p”); ?> Save the file as redir.php and then use it as http://mysite.com/redir.php?p=http://google.com/. 1 solved Need php script just like used by … Read more

[Solved] Unable to output anything. [closed]

Review your syntax for calling functions: S2 = *studentData(S1); I believe functions are called without the ‘*’: S2 = studentData(S1); There may be more like this in your program. Edit1: Passing by reference, returning pointer to passed reference On further inspection of your program, the function studentData receives a Student variable passed by reference. This … Read more