Questions tagged [initializing]
115 questions
0
votes
1 answer
How to access a structure field from a void pointer?
I'm working on a "Node" structure for a C project, and even though the question might be pretty trivial, I just can't figure out how to solve a pointer that accesses an invalid value.
Here is the structure code:
struct Node {
// the data is stored…

Daniel Tanase
- 47
- 4
0
votes
1 answer
Calling method from Fragment in RecyclerView Adapter - Lateinit property textView has not been initialized
I have a list of items. When I swipe on an item, I want to update a textView in the Fragment.
I use a RecyclerView. In the Adapter, I detect when a user swipes something, and then I try to call a method in the Fragment to update a textview.
However,…

The Fluffy T Rex
- 430
- 7
- 22
0
votes
1 answer
Can I initialize an array in the header?
So, I am making a program. And by the start I've got an error. If I do this:
#include
int k[5];
k[0] = 1;
int main ()
{
printf("hello world %d",k[0]);
}
I get the following errors:
4 [Warning] data definition has no type or storage…
0
votes
1 answer
Initializing Flutter-Fire flutter Web
I can't figure out where is the problem output gives me Connection failed Here is the screen out put image. I'm trying to Initializing FlutterFire (Flutter Web). I'm doing it with the proper guidelines of official documentation…

Adeel Nazim
- 640
- 6
- 17
0
votes
1 answer
Visual Studio Code stuck on "Initializing Flutter"
I've just started a self-study course for Flutter (note I have no programming experience so you'll really need to dumb down your responses to me lol), and in Visual Studio Code when I select "Run without debugging" under "select environment" dart…
0
votes
1 answer
printing a 2D array :warning: excess elements in array initializer
I'm trying to print 8 rows and 5 columns in my output, but my code is throwing errors saying:
warning: excess elements in array initializer.
This is my code:
#include
void main()
{
int rows,columns;
int array[8][5] =
{
{…
user14048924
0
votes
1 answer
App stopped working from one day to another with no changes
I was hoping you could guide me in some direction since im totally lost. Today i opened my project on vs code, and it just gets stuck on initializing flutter forever. So i start the project via flutter run on the console. And i get this error…

Decitizen M
- 21
- 4
0
votes
2 answers
Newbie: referencing and initializing structure elements within structures
OK, super-newbie Swift learner here with what I am sure is a simple question, that for some reason I cannot wrap my head around.
In the below code, I am creating a (very) simple address book structure just to understand how to reference and…

Ralph
- 3
- 1
0
votes
0 answers
How to initialise all elements of arrays that have size defined via variables
Initializing all the elements of a double dimensional array with constant size like this works:
int A[10][10]={0};
But initializing all elements of a double dimensional array with variable size specified, as below, does not works :
int n=10,…

Ashish Chourasia
- 108
- 1
- 8
0
votes
5 answers
Why doesn't this initialize correctly?
I'm trying to initialize a class constructor within another constructor. The GCC raises the error, 'Type 'foo' does not have a call operator.'This psuedo-code should explain my intentions.
class foo {
type arg1, arg2;
foo (type _arg1, type…
0
votes
3 answers
How to Initialize State for each Element in Array ReactJS
New to React and building a geography app. I have an array of continents
uniqueRegions = ['Asia', 'America', 'Europe', 'Africa', 'Oceania', 'Polar'] in my props as this.props.uniqueRegions. In my component, I want to set the state of a property…

Khari Kisile
- 79
- 3
- 11
0
votes
3 answers
Pointer initialization concept in C
Why is this erroneous?
char *p;
*p='a';
The book only says -use of uninitialized pointer.
Please can any one explain how that is?

Raviraj Gardi
- 93
- 7
0
votes
1 answer
Error message when trying to use .equals to give a value to a variable
I want to add up the values of temperature, humidity, and sunshine, but I don't know why it says that the "sunshine" variable isn't declared. I want it to work so that when the user types in "yes", then sunshine gets set to 25, and if they type no,…

Ethan Creveling
- 31
- 3
0
votes
1 answer
When I try to initialize map in main activity and test it in a real phone, the app crashed
I am new in Android developing and I work with video tutorial, he uses getMap() for initializing mMap object and I try with getMapAsync(). but when try to initializing my app crashed.
This is my initMap() code:
package…

sajjad
- 11
- 2
0
votes
0 answers
Instance Variables in objective C
lets say I have the following class
@implementation userSetUp{
NSString *folderIdentification;
}
-(id) initWithDriveService:(GTLRDriveService *)driveService withFilePath: (NSString *)aFilePath{
folderIdentification = some string
}
end
now I…

JustANoob
- 65
- 2
- 14