| | |
Saving memory by using constants
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
I'm new to c++ programming and use it to program a microcontroller. Since memory is limitted (only 12 kb), I'm looking for a way to reduce memory usage when using some large arrays with floats that are constants. Is it possible to somehow write these arrays to ROM without them having to be transferred to memory before usage?
I did try something like:
, but this does not seem to be working.
I did try something like:
C++ Syntax (Toggle Plain Text)
static const float myArray[100] = {1.23, 4.56, .... }
, but this does not seem to be working.
![]() |
Similar Threads
- Help needed :( (C++)
Other Threads in the C++ Forum
- Previous Thread: introducing bit erasure in packets..
- Next Thread: char variables
Views: 376 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api array arrays based beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library lines linker list loop looping loops map math matrix memory newbie news number output pointer problem program programming project python random read recursion recursive reference return rpg search simple sort spoonfeeding string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






