| | |
anonymous array in method argument
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Solved Threads: 0
Hello, i'm relatively new to C++, and i'm wondering, how can i pass in an anonymous array into a method?
I want to put the float array color into the argument itself, so i don't have to specify it separately, something like this:
Is this possible? Thanks.
C++ Syntax (Toggle Plain Text)
float color[4] = {1.0f, 1.0f, 1.0f, 1.0f}; showInfo("test", 10, 10, color, GLUT_BITMAP_HELVETICA_12);
I want to put the float array color into the argument itself, so i don't have to specify it separately, something like this:
C++ Syntax (Toggle Plain Text)
showInfo("test", 10, 10, {1.0f, 1.0f, 1.0f, 1.0f}, GLUT_BITMAP_HELVETICA_12);
Is this possible? Thanks.
![]() |
Similar Threads
- First time using JLabel and JTextArea. Please help!!! (Java)
- Help with Java programming for lottery (Java)
Other Threads in the C++ Forum
- Previous Thread: struct is wrong, I guess...
- Next Thread: Newbie needs direction!!
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






