Questions tagged [custom-object]
202 questions
-2
votes
2 answers
Array of pointers holds the same value for all elements
I'm currently deep-diving into the way pointers work.
Something for me unexplainable happened when executing the following lines of code:
std::vector sources;
for (const auto &source : sourceOperators){
…

JVS
- 2,592
- 3
- 19
- 31
-2
votes
1 answer
Serializing Custom Objects in Java - java.io.FileNotFoundException
I have a method that is requiring me to serialize objects of a custom class 'Fraction'. When I attempt to save the object, I get a java.io.FileNotFoundException. What could I do to help alleviate the issue?
public static void method3()
{
…

Mitchell Walker
- 11
- 2
-2
votes
1 answer
Can I store an array of custom data types inside a custom object in javascript
I need a custom object for a staff member so I have this in staff.js:
function Staff(name, shouldBeRemoved, officeName, dateHired) {
this.name = name;
this.shouldBeRemoved = shouldBeRemoved;
this.officeName = officeName;
…
-2
votes
1 answer
Compile Error: line 6:102 no viable alternative at character '"'
hey so i keep getting a Compile Error: line 6:102 no viable alternative at character '"' error and i do not understand why. If anyone could explain this it would be great. Code follows:
public class leaderboardController {
public void…

user1828256
- 25
- 1
- 3
-3
votes
1 answer
Construct custom object from two objects
I have two objects:
PropID ValueX
---------- ------------
8039 xxxx
8041 xxxx
8042 xxxx
PropID ValueY
---------- -------
8039 yyyy
8041 yyyy
8042 yyyy
I want to end up with a new object containing…

Rakha
- 1,874
- 3
- 26
- 60
-3
votes
2 answers
What's the best way to pass a whole recyclerview to another activity using Intent?
My RecyclerView in one activity is made up of an ArrayList of my custom object. Because this activity is in the edit mode, I would like to pass all the contents of this RecyclerView into another activity that is in non-edit mode. What is the best…

Rachel Boey
- 35
- 1
- 6
-3
votes
5 answers
Custom object not storing all names
I have this code in my gymInfo class:
public class gymInfo
{
public gymArray getAllGymsByStars()
{
gymDataTableAdapters.gymsTableAdapter gymsTableAdapter = new gymDataTableAdapters.gymsTableAdapter();
DataTable gymsDataTable =…

mogorilla
- 195
- 2
- 13