argument

C++ Passing Pointer to Function (Howto) + C++ Pointer Manipulation

I am a little confused as to how passing pointers works. Let's say I have the following function and pointer, and... EDIT: ...I want to use a pointer to some object as an argument in the function. i.e.: void Fun(int Pointer){ int Fun_Ptr = ---Passed Pointer---; //So that Fun_Ptr points to whatever ---Passed Pointer points...

How to input the name of the text file as a function's argument in Matlab?

Basically I export .dat files, with headers, from a software and then I use data in them in Matlab. I am making a general function in Matlab which could read the data from the .dat files I export from the software. Can you tell me the way I can input the name of the .dat file as function's argument? function [property_without_headers]=g...

Can C#'s delegate methods take implicitly typed arguments?

I'm curious if it's possible to create a delegate method with implicitly typed arguments. Here's what I'm trying to accomplish. This sort of thing won't compile for me, but it should give you an idea of what I'm trying to accomplish. here's the functions I want to call using delegates: class MyClass { ArrayList function1(int param1...

Why does initializing a variable via a python default variable keep state across object instantiation?

I hit an interesting python bug today in which instantiating a class repeatedly appears to be holding state. In later instantiation calls the variable is already defined. I boiled down the issue into the following class/shell interaction. I realize that this is not the best way to initialize a class variable, but it sure should not be ...

vim run perl script with word under cursor as argument

is it possible to send the word under the cursor to a perl script by typing a shortcut? how do i do that? ...

How can I pass two arrays and a string to a Perl subroutine?

How can I pass two arrays and a string to a sub? Here's what I'm trying to do: use strict; use warnings; my @x = qw(AAAA BBBB CCCC DDDD EEEE); my @y = qw(1111 2222 3333 4444 5555); my $z = "hello"; Hello(@x,@y,$z); exit(0); sub Hello { my (@x,@y,$z) = @_; print "$_\n" for @x; print "$_\n"; print "$_\n" for @y; ...

Incompatible Pointer Type Error

Hey everyone, I am getting a compile error in my code, and I cannot figure out what to do. Here's the block: #include <stdio.h> #include <string.h> /* * Function to return index at which team ID input is stored */ int getIndex(char* id, char* idList[][50]) { int k; for (k=0; k<50; k++) { if (strcmp(id,idList[k])==0...