- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!!
I need to initialize a pointer but getting errors as invalid initialization type.
Using Image Craft compiler[PSoC Designer 5.4], PSOC1.
Problem initializing the variable with unsigned/signed int.
Thank you.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would be much easier if you provide us with a project archive so that we can have a look at all of your code and settings.
Use Designer -> File -> Archive Project...
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you both.
Trying to attach the project file[notepad format], to resolve the issue.
But the errors are displaying like below:
Error message
The specified file 210715.rar could not be uploaded. Only files with the following extensions are allowed: doc pdf zip cycomp xls rtf txt docx xlsx pptx ppt png jpg jpeg gif.
Error message
The specified file main.c could not be uploaded. Only files with the following extensions are allowed: doc pdf zip cycomp xls rtf txt docx xlsx pptx ppt png jpg jpeg gif.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler is telling you that you passed an integer vs a pointer, eg. an address.
For example, if my function wants a pointer, and I declare
uint myray[12];
Then you can call afunc( myray ) or afunc( &myray[0] ) but if you
did afunc( myray[0] ) then you would violate the afunc calling parameters
because you passed it an int rather than an address, a pointer.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you follow my advices the archive will be a .zip-file which you may upload.
Did you already try a type cast?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a complaint with forum moderator on inability to upload .RAR files.
Its a standard in many parts of the world, so should be allowed.
You can always upload a .rar by renaming it to .txt and telling end user to rename it back.
More than one way to skin a cat.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at you code, since it is a fragment I am not sure what's going on.
I looked at GNU reserved words, p is not as far as I can find.
Should this -
unsigned int *p[] = {7,8,9,11,13,15,18,22,26,32,39,47,58,71,85,103};
be typed as this -
unsigned int p[ 16 ] = {7,8,9,11,13,15,18,22,26,32,39,47,58,71,85,103};
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, as I thought:
int * p = (int *)7; // Assigns 7 to the pointer p
This should be syntactically correct. For your case you'll have to precede each value with the type cast (int *)
Bob