Questions tagged [initializing]

115 questions
0
votes
1 answer

Initializing array of objects

I want to initialize an array. There's no compilation error but when I run the program it shows the first cout then stop running. Here's my code: class A { string first_name ; string last_name; int ID; public: virtual void print…
Rai Ou
  • 15
  • 6
0
votes
1 answer

Initializing edges with dijkstra's algorithm

I am confused on how to initialize my Pointer (edge) class when implementing my Dijkstra's algorithm. The Node class holds an ArrayList of Pointer's called neighbors, which represent the 4 neighbors on any side of the Node. My Pointer class takes…
SpiderShlong
  • 224
  • 1
  • 8
0
votes
3 answers

java Local variable not initializing outside if-statement

Eclipse says that the variable age, agirl and aboy may not have been initialized. I initialized the variables before the first if statement and they got values in the if-statement. When I want to use them in the next if-statement eclipse says the…
Frank
  • 83
  • 2
  • 10
0
votes
2 answers

Page doesn't initilize properly when backing from location.href

I've just finished writing a pretty substantial amount of Javascript (I'll spare you everything but the most relevant parts) and I'm left with just one problem. At one point I need to use location.href to advance to an article page. If the user…
Sandy Gifford
  • 7,219
  • 3
  • 35
  • 65
0
votes
1 answer

When I open Eclipse 3.7.2 I get this error "Initializing error tooling" Android

So I am using Eclipse 3.7.2 to program android appications but now that I open it up I get the error "Initializing error tooling" It didn't used to do it before so I don't know what happened. All I can remember is that recently I updated some SDK…
Fernando
  • 450
  • 1
  • 7
  • 22
0
votes
1 answer

Trying to initialize multiple 'select' inputs inside a list item

my first post at StackOverFlow ^_^ (So yeah, i'm a noob, be gentle) I have searched and actually found several solutions to my question around the web, but for some reason none of them work for me. So here it goes: I have a list item, and inside it…
Nom1fan
  • 846
  • 2
  • 11
  • 27
0
votes
1 answer

Ways of initializing arrays in C

I'd like to know the different ways for initializing an Array in C, because i'm having a little problem when trying to do something... Im starting programming in C in college, its the first language, and we are viewing pointers and some…
JorgeeFG
  • 5,651
  • 12
  • 59
  • 92
-1
votes
1 answer

Using initializing blocks into conditional statements

I've tested the scenario with initializing blocks, the problem is that if we declare initializing block into if conditional or other conditional statements, initializing block runs first when object initializes. What the purpose of using…
-1
votes
3 answers

Passing an ArrayList or creating a new one?

I'm building an application in which I create the same ArrayList in every Activity. An other option is creating the ArrayList in the first Activity and then pass it on to other activities. However, I don't know if this is 'better' than creating the…
-1
votes
6 answers

Initializing members of derived class (C++)

What is the preferred method for initializing a derived class that was casted from it's base class? Consider the following scenario: class A{ public: A(); ~A(); } class B : public A{ public: …
Hank
  • 25
  • 6
-1
votes
1 answer

initializing variable using iterators inside loop ruby

I want to create variable names like like a1, a2.. n.times { |n| puts "enter number of rows and columns for #{n} array" rows = gets.to_i cols = gets.to_i a+"#{n}" = Array.new(rows,'w') {Array.new(cols,'w')} } Error: syntax error,…
-1
votes
2 answers

How to make multiple Strings equal to one value (Java)

I want something like this: String Aa, Eb, Cc, Dd, Be, Ff = "1"; String Ba, Db, Ac, Ed, Fe, Cf = "2"; String Ea, Cb, Bc, Fd, Ae, Df = "3"; String Da, Ab, Fc, Bd, Ce, Ef = "4"; String Fa, Bb, Ec, Cd, De, Af = "5"; String Ca, Fb, Dc, Ad, Ee, Bf =…
user7112775
-1
votes
1 answer

NullPointerException in JavaFX while initializing three Controller classes in Main function

I get a NullPointerException in JavaFX when initializing my FXML in Main class. I call in every Controller class the Main function initProgramm() and count the calls. @Override public void initialize(URL url, ResourceBundle rb) { …
Luke
  • 59
  • 7
-1
votes
2 answers

Vb.NET instruction execution not triggered by event

I have a very basic question on vb.NET, so basic that I didn't find any answer elsewhere. I've written with VB express a code that is a simple form proposing various choices through checkboxes. These choices have to be registered in an array, which…
user3094822
  • 5
  • 1
  • 1
  • 3
-1
votes
2 answers

C: Incompatible types in assignment error when trying to initialize char arrays within a structure

I'm attempting to create a program for an assignment concerning structures. The idea is to create a structure containing variables for first and last name, phone number, and email address. I think most of my code is okay - perhaps rudimentary…
CDAGeek
  • 59
  • 2
  • 14