107 Topics

Member Avatar for
Member Avatar for Khodz

So i'm trying to make a module for my program that returns a multidimensional array based on another array in the form of a command-line argument. Here is the module that's keeping me up at night: [CODE]public static double[][][] getDimensions(String [] args) { final int l = args.length; double dimensions …

Member Avatar for Khodz
0
168
Member Avatar for Lord_Migit

hey folks, i have a problem which seems to be reasonably simple but i havnt managed to figure it out yet. Iv read alot of the other threads on this but i still havnt found one that iv both understood and solved my problem. So here goes... Its concerning returning …

Member Avatar for Lord_Migit
0
130
Member Avatar for Xufyan

How to return two values from one method ?? for example i've made the following program. [CODE]import java.io.*; class vowel{ public static void main (String args[])throws IOException{ String sentence; InputStreamReader isr = new InputStreamReader (System.in); BufferedReader br = new BufferedReader (isr); sentence = br.readLine(); System.out.print (vowels(sentence)); } static char vowels …

Member Avatar for Xufyan
0
199
Member Avatar for sakush100

I AM WEAK IN JAVASCRIPTING, PLEASE HELP ME.[B]THIS IS MY BASIC IDEA TO TOGGLE VALUES USING JAVASCRIPT[/B] [CODE] [COLOR="red"]<?php $xyz=5; ?>[/COLOR] <head> <script type="text/javascript"> var x; function displaymessage() { if (x==5) { alert("yes"); x=1; } else { alert("no"); x=5; } } </script> </head> <body> <form> <input type="button" value="Click me!" onclick="displaymessage();" …

Member Avatar for Ezzaral
0
172
Member Avatar for iPeterS

Hi, I'm kind'a new to AJAX, and have not a lot experience with JS, so this might be just a stupid beginners-error... I'm busy creating a PHP-website in which i'd like to implement some dynamic features (like adding comments tot photo's without having to reload, searching a user-DB, etc). I've …

Member Avatar for iPeterS
0
132
Member Avatar for tookerello22

hi how is it possible to return an array from this: private void btnResult_Click(object sender, EventArgs e) { ArrayList arlist = new ArrayList(); arlist.Add(examResults); return arlist; } Many Thanks

Member Avatar for Geekitygeek
0
232
Member Avatar for Excizted

Hello, [I]Before you get scared away - my issue does not particular seem to relate to Quaternions or Vectors. More generally, it appears to be something compiler or C++ standard related, as my return call from the function is acting strange. You can eventually start reading the [U]concluding issue at …

Member Avatar for Excizted
0
194
Member Avatar for MarkBrend

Hi, I am writting a dll and want to return a result back to the calling code. I have tried putting:- public string oSQL2XStreamBridge( string Name) public class string oMyDll both of which it does not like... the code below errors because there is a return statment and it says …

Member Avatar for nick.crane
0
119
Member Avatar for pi_lord12

Ok, so I'm trying to make a constructor for a text-based game for a monster. Here is the code for it: [CODE]public class Methods { String name; //characteristics of monsters int bodyPoints, mindPoints, attack, defense; public Monster(String name, int bodyPoints, int mindPoints, int attack, int defense) { this.name=name; this.bodyPoints=bodyPoints; this.mindPoints=mindPoints; …

Member Avatar for pi_lord12
0
2K
Member Avatar for Annettest

Hello everyone: I am a C++ newbie. I have used Matlab to fill the rows or columns of a matrix with values from a vector and I'm wondering how to do the same thing in C++... I have written code that puts new values in a vector. This happens in …

Member Avatar for Lerner
0
238
Member Avatar for Destiny1

Hello, everyone. I'm at the moment doing a homework assignment involving static methods and arrays. It consists of the following instructions. I'm to create a class known as ArrayStatisticsMethods and in this class, there are definitions to four different "public static" methods which will be described. I'm provided the use …

Member Avatar for mkurdukar
0
501
Member Avatar for rsaska

I have created a procedure, exitFailure() that is invoked if a file doesn't exist: [CODE] int exitFailure() {//start exitFailure() printf("Failure, hit any key to exit and press enter.\n"); scanf("%d", &counterx); return 1; }//end exitFailure() [/CODE] Below is the snippit of code that invokes exitFailure() [CODE] inFile.open(inputFilename, ios::in); if (!inFile) { …

Member Avatar for Sodabread
0
151
Member Avatar for 9w43

Hello, I have a class named Time and when I run it I can enter the time, increase the hours and minutes, the minutes and hours will stored in their fields. I have another class called TimeTest, when this class is running, it needs to display the test results of …

-1
84
Member Avatar for denizen08

[CODE=C++]polynomial polynomial :: derivative(void) { polynomial outpoly; outpoly._coef = new double [_degree]; outpoly._degree = (_degree-1); for(int i=0; i<(_degree); i++) { outpoly._coef[i]=(i+1)*_coef[i+1]; } return outpoly; } //header: #pragma once #include <complex> #include <iostream> #include <string> #include <sstream> using namespace std; class polynomial { private: double * _coef; int _degree; public: // …

Member Avatar for Narue
1
165
Member Avatar for codewalkz

mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); $root = 1; function display_tree($root) { // retrieve the left and right value of the $root node $result = mysql_query('SELECT lft, rgt FROM tree '. 'WHERE name="'.$root.'";'); $row = mysql_fetch_array($result); // start with an empty $right stack $right = array(); // now, …

Member Avatar for sam023
-1
166
Member Avatar for bdesc100

I am trying to specify which variables a function should return. The purpose of this is to allow the function to return different sets of variables according to the requirements of another function, in order to make things more efficient (rather than always returning all the variables): [CODE] # Python …

Member Avatar for paddy3118
0
110
Member Avatar for leoni

Hi All! I have a doubt about returning reference. I'll show you an example: [CODE] Vector &MakeVector() { Vector *result = new Vector<Dim>(); /*some more code*/ return *result; } [/CODE] now I can call the function MakeVector to assign it result in this two ways: [CODE] Vector v = MakeVector(); …

Member Avatar for leoni
0
142

The End.