Tagged Questions
-7
votes
0answers
36 views
please help i would like to know whats wrong with this program,please ASAP [closed]
hey so in my code there's an array,in this array third of the numbers in it are divided by 3 without a remainder,the other third are numbers that have the remainder oof when divided by 3 and the last ...
-10
votes
2answers
65 views
Write a java program for a report card [closed]
Can anyone please write a java program for a report card that accepts name of students, marks of 5 subjects. Compute total percentage, highest marks, lowest marks. assume that there are 40 students in ...
1
vote
2answers
35 views
In a function prototype it shows an error
it shows cannot find symbol- class string
I am writing a program for a report card. This function is to accept names. Pls help
public static string accept_name() {
String STR[]=new String[40];
...
-9
votes
2answers
47 views
How to store a returned object from a method in a new object in the main method in JAVA [closed]
It shows array dimension missing.
new obj[] = mark_entry();
where mark_entry() is a method.
1
vote
2answers
24 views
Comparing Array Key values to determin conditional statements the OOP way?
I have been looking at this problem for quite sometime and finally created my answer.
I have three array keys that will output different values. The condition of each key will either be true or NULL ...
0
votes
1answer
32 views
Wrong dataype for in_array
Good morning.
I'm currently trying to build a very basic caching system for one of my scripts. The cache is JSON data and contains only 1 key and it's value, but many individual fields, something ...
-3
votes
1answer
67 views
Using If/Then with Arrays
Hi I'm trying to prepare an if/then statement for my program using arrays. However, I am receiving an error, below is my function definition.
Error: ISO C++ forbids comparison between pointer and ...
0
votes
1answer
28 views
Will not display in list box VB
So, I'm trying to display the statistics for a soccer teams points scored.
At the time this is being executed, the arrays have been already filled and what not.
When this form opens, I'd like it to ...
2
votes
1answer
74 views
Implementing the [B,C]=f(A) syntax (function f acting on an array with two or more output arrays)
I have a question which is an extension of other two questions I have recently posted:
Implementing B=f(A), with B and A arrays and B already defined
and
Implementing the B=f(A) syntax by move ...
0
votes
1answer
39 views
Populating an array with values that fall below the averange and calculating the variance
I am trying to select those values from a one-dimensional range of data that fall below the average.
Would this code be right? I think there is a problem with how I place them into the array ...
0
votes
0answers
10 views
how can I make a generic function for pushing a class object into an array?
this is my first time asking a question on this form so please go easy on me if I say something stupid!
I'm trying to make a tower defense game in actionscript 3 that has enemies and power ups as ...
3
votes
1answer
82 views
How to pass two dimensional array to a function in F#?
I am trying to create a function in F# that takes as input a two dimensional array of integers (9 by 9), and prints its content afterwards. The following code shows what I have done :
let printMatrix ...
0
votes
1answer
21 views
AS3 - Functions in Arrays
I've recently started using AS3, and I've ran into a little problem.
I want to store some functions into an array like so:
testArray:Array = [testfunction(), testfunction2()];
But when I start it ...
1
vote
2answers
57 views
My append function does not work as expected. C++
I am writing my own append function to append a dynamic character array of string array2 at the end of another dynamic character array of string array1, using a static char buffer[50]. But the ...
0
votes
1answer
14 views
Char array size when using certain library functions
When using some library functions (e.g. strftime(), strcpy(), MultiByteToWideChar()) that deal with character arrays (instead of std::string's) one has 2 options:
use a fixed size array (e.g. char ...
0
votes
1answer
64 views
Python function which will call a 1D vector values
I have the next sequence of numbers of A array( is an array 1D )
-1.7654142212e-06
7.0737426918e-07
1.63230254789e-06
1.88255344022e-06
5.00966829007e-06
1.88631278169e-06
-4.08751917695e-06
...
-4
votes
0answers
37 views
How hard would it be to make simple match pictures game in Python? [closed]
I'd like to know how hard would you think it would be for me to make a simple match pictures game. There will be squares you have to click on, and when you click on them they turn around with a ...
1
vote
1answer
25 views
Saving return values of function returning multiple variables in Matlab
I have never used matlab before so excuse this very basic question.
Basically I have a function that returns multiple variables, defined like so:
function [a, b, c]=somefunction(x, y, z)
I know I ...
0
votes
2answers
59 views
C++ Array of Functions
I'm trying to deal with an array of functions, however when I assign the functions to the array (in the class's default constructor) I am greeted with the error message:
"void (GameObject::*)()" ...
0
votes
2answers
81 views
How do I pass a pointer to an array of pointers as an argument to a function?
I'm trying to code a robot, and I'm having a confusing situation. I need to pass an array of pointers to objects to a constructor of a class. I can't, however, populate the array before I pass it into ...
0
votes
2answers
37 views
Passing Array to Oracle Function
I am passing an array to a PL/SQL package function. I am doing this to use this array in a query inside the function which has IN clause.
My declaration of package looks like :
create or replace
...
-5
votes
3answers
73 views
Type 'double' unexpected [closed]
I've written a function which calculates determinant of square array. When I tried to create dynamic array and running program, compiler(Visual C++ 2010) thrown an error C2062: type 'double' ...
0
votes
1answer
69 views
Dynamic array as function argument
In main function of my program I've created dynamic array with number of elements specified in variable(after calculations array is deleted):
cin >> bok;
double **macierz;
macierz = new double ...
0
votes
1answer
51 views
Bash function, array howto?
I'm struggling to wrap my head around Bash arrays, in particular I have this function where I need to load an array; What I have written is this:
function list_files() {
for f in *; do
...
-1
votes
1answer
31 views
Sorting the output of a function to display from High to Low
I have a struct, defined as this:
typedef struct structure
{
char names[20];
int scores[4];
float average;
char letter;
} stuff;
And from that struct created this array:
stuff everything[13];
...
1
vote
2answers
30 views
Printing an array of strings during a loop
Writing a function that uses a loop to display a small chart of "names" "e1" "e2" "e3" "e4" "avg" and "grade". In the function I'm having trouble printing the elements stored in the "names" array.
...
0
votes
1answer
61 views
passing functions using array and buttons as3?
I have been searching for an answer to my actionscript 3 problem... I'm new to the community and actionscript so please bear with me.
I am using an array to store my data and have six movie clips I ...
-1
votes
1answer
50 views
Php cant send array to other function [closed]
I want to send an array from a function to another. This code is not displaying errors on the page but if i go the source code first error says "SCREAM: Error suppression ignored for" and then ...
-6
votes
3answers
66 views
Too few arguments to function error? (C++) [closed]
I have no idea why the this code isn't working, Any help would be appreciated. no matter what I do I still get the same error. I know that there needs to be more arguments passed, but I just don't see ...
0
votes
1answer
81 views
Calculating average, min, max of a 2d array
I'm supposed to write a program to read and fill an array with 5 student IDs and their grades then print the average, min and max grades with the IDs of the students, an example could be:
Student 1: ...
2
votes
4answers
153 views
Implementing B=f(A), with B and A arrays and B already defined
Suppose I have an array B that has been already defined and used somewhere in a C++ code. Now, suppose that I have another array A that has been defined and initialized. I want to create a function f ...
0
votes
2answers
41 views
PHP - Use an Array to loop through a second Array
Using explode('<br>',$String) I have an Array1 with sub-Strings.I want to use an Array2 as needles to loop through Array1 and if a Sub-String is found return Array2 values.
Example:
$Array1 { ...
0
votes
0answers
5 views
Sending OutPut to two files from an array and a function
What am I doing wrong here? When I send this I am getting totally blank files? Do I need to re-work the array or is the function not actually sending anything to the files? This is homework so helpful ...
-7
votes
1answer
67 views
What is an inline array in C ++? Please place some helpful code? [closed]
I have a question regarding an inline array in C++. Can someone please explain what it is in terms of C++.
0
votes
1answer
63 views
Writing to two files using functions and arrays
I tried everything and what I have is something I know is incorrect but at least the output is formatted how I need it for one of the two files. I need to send information out into two separate .txt ...
0
votes
3answers
66 views
javascript array lost in function call
Do you have any idea why the console.log below is showing the value I have stored in the array videoList (itself an array of file locations)
$(window).load(function(){
videoChoice = ...
2
votes
1answer
43 views
Unable to call an Oracle Function
I have a package with a function in it like following, which expects one of the parameter which is array.
create or replace PACKAGE selected_pkg IS
TYPE NUM_ARRAY IS TABLE OF NUMBER;
FUNCTION ...
1
vote
4answers
97 views
Returning arrays and pointers in C?
I'm relatively a beginner in programming in C and am getting super confused with arrays and pointers.
Basically what I'm trying to do is extend a string that contains binary to the designated length ...
-6
votes
0answers
32 views
take n numbers as input in an array and perform a tertiary search using recursion
I have no idea how to start. Recursion is quite difficult for me as I'm new to programming in c! I need to take 'n' Numbers as input in an array and perform a tertiary search using recursion.
0
votes
1answer
13 views
Request is sent until timeout
I am working on a facebook app and I am trying to send some requests, but one particularly seems to create problems: under the NET panel of FireBug, I can see that the request is sent again and again ...
0
votes
2answers
56 views
How do you pass a typedef struct to a function?
At the moment I'm trying
void avg(everything)
But that gives me the error:
error: subscripted value is neither array nor pointer
And when I got this error earlier today it was because I wasn't ...
0
votes
1answer
35 views
String Error in Void Function Segmentation Fault
This is one void function from a larger program, with the function of printing a kind of chart. It would first print the header, and then it uses a for loop to print 13 lines that calls information ...
0
votes
3answers
47 views
subscripted value is neither array nor pointer function error
Working on a program that will read data from a few files, scan it into arrays, and eventually print to the screen 13 names, with 4 numbers next to each of them, and a letter after those numbers in a ...
0
votes
1answer
56 views
Can't save $_POST array to database with function
I have a form that has multiple inputs of the same name, resulting in an array. I want to pass this $_POST array to a function which will process and save the array into a database.
I've done this ...
0
votes
1answer
66 views
Function struct array input cin problems
I can't figure out how to fix this code.
void getInfo(Author a[], int size)
{
for(int x = 0; x < size; x++)
{
cout << "Enter the author's name: ";
...
0
votes
2answers
32 views
What is the most efficient way to return a simple (but large) array from a function in classic asp?
I am using a classic asp function that returns an array, like this:
function myArray()
dim tmpArray(2)
tmpArray(0) = "abc"
tmpArray(1) = "xyz"
...
0
votes
1answer
48 views
Returning a pointer is not working fine
When I try to display the content of an array via a pointer returned by a function, the program displays only zeros. I am not sure what is missing. I have tried to check several times what is wrong, ...
-1
votes
1answer
41 views
Python: comparing columns in numpy
I am writing a program that creates a file by an add_to_file function and then another program takes that file as input.
the file has 4 columns: name, start position(s), description, end position(s)
...
1
vote
3answers
75 views
How do I tell a C program to create n arrays, reading n by scanf?
I'd like to create a small program that adds, subtracts, multiplies and does a cross product for vectors.
Therefore I'd like to have the user enter
- the amount of vectors
- the dimension of said ...
0
votes
1answer
30 views
Show image when button is clicked
I have this div:
<div id="flaw">
<img id='flaw1' src='images\flaw1.png'>
<img id='flaw2' src='images\flaw2.png'>
<img id='flaw3' src='images\flaw3.png'>
...