| | |
anonymous array in method argument
![]() |
•
•
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 |
ace_thread api array based binary bitmap borland c++ c/c++ calling char class classes code coding compile console conversion count delete delete-line deploy desktop developer directshow dll download dynamic dynamiccharacterarray email embedded encryption error file forms fstream function functions game givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream information input int integer java lib linkedlist linker loop looping loops map math mathhomeworkhelp matrix memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion reference reverse richedit rpg string strings temperature template test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






