| | |
GUI, matrix and vector libraries
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2006
Posts: 1
Reputation:
Solved Threads: 0
I originally joined this site almost a year ago so i could find out the name of the GUI library that's in most compilers. Didn't get much help back then.
But I hope that will change. I'm making a sudoku game in C++, so obviously I need a matrix (or a vector of vectors, if possible). Also, I could make it text-based, but I'd rather have some graphics. So, I need a matrix library, and a GUI library.
I thought that vectors were:
But apparently not. And I thought that matrices were:
But apparently my compiler doesn't even have the matrix library.
So could somebody help me out? In a nutshell, I'm having trouble with GUI, matrices, and vectors.
(By the way, I'm using Dev-C++ 5 on Windows XP.)
But I hope that will change. I'm making a sudoku game in C++, so obviously I need a matrix (or a vector of vectors, if possible). Also, I could make it text-based, but I'd rather have some graphics. So, I need a matrix library, and a GUI library.
I thought that vectors were:
C++ Syntax (Toggle Plain Text)
#include <vector.h> ... vector<allocator_type> name(length);
C++ Syntax (Toggle Plain Text)
#include <matrix.h> ... matrix<allocator_type> name(xDim,yDim);
So could somebody help me out? In a nutshell, I'm having trouble with GUI, matrices, and vectors.
(By the way, I'm using Dev-C++ 5 on Windows XP.)
Last edited by the_glitch; Apr 16th, 2007 at 9:51 am.
Not clear whether you have problems in declaring a 2D container or in showing a 2D container's data on a GUI?
If it's already been a year since you started on C++ I'm sure you know that a XxY matrix can be represented by:
For pure C graphics use graphics.h.
For VC++ graphics you can use MS Flexi Grid (I donno what's DevC++)
If it's already been a year since you started on C++ I'm sure you know that a XxY matrix can be represented by:
c++ Syntax (Toggle Plain Text)
typedef vector<int> ROW_VEC ; vector< ROW_VEC > matrix ; int init_values[] = { 1,2,3,4,5,6,7,8,9 } ; ROW_VEC oneRow( init_values, init_values + 8 ) ; for( int i = 1; i<=9; i++ ) { random_shuffle( oneRow.begin(), oneRow.end() ) ; matrix.push_back( oneRow ) ; } for( i = 0; i<matrix.size(); i++ ) { for( int j = 0; j<matrix[i].size(); j++ ) cout << matrix[i][j] << '\t' ; cout << endl ; }
For pure C graphics use graphics.h.
For VC++ graphics you can use MS Flexi Grid (I donno what's DevC++)
Last edited by thekashyap; Apr 16th, 2007 at 10:48 am.
>I'm making a sudoku game in C++, so obviously I need a matrix (or a vector of vectors, if possible).
...yes a 2d array or variants of.
>Also, I could make it text-based, but I'd rather have some graphics.
If this is your first program then stick to text-based, GUI programming is slightly more involved.
> I thought that matrices were:
#include <matrix.h>
matrices, there is no such thing unless you are talking of the mathematical sense. You probably mean a 2d array.
>So could somebody help me out? In a nutshell, I'm having trouble with GUI, matrices, and vectors.
Yes start with a text based program, and work out your ideas on paper first.
>(By the way, I'm using Dev-C++ 5 on Windows XP.)
Dev has all the features necessary to make a win32 GUI application, but it is considered hard to pick up. For a more user friendly introduction into GUI programming your might want to check out c# or vb.net. But then you got to know OOP, so it is give and take.
...yes a 2d array or variants of.
>Also, I could make it text-based, but I'd rather have some graphics.
If this is your first program then stick to text-based, GUI programming is slightly more involved.
> I thought that matrices were:
#include <matrix.h>
matrices, there is no such thing unless you are talking of the mathematical sense. You probably mean a 2d array.
>So could somebody help me out? In a nutshell, I'm having trouble with GUI, matrices, and vectors.
Yes start with a text based program, and work out your ideas on paper first.
>(By the way, I'm using Dev-C++ 5 on Windows XP.)
Dev has all the features necessary to make a win32 GUI application, but it is considered hard to pick up. For a more user friendly introduction into GUI programming your might want to check out c# or vb.net. But then you got to know OOP, so it is give and take.
*Voted best profile in the world*
![]() |
Similar Threads
- Vector of vectors & magic square issues (C++)
- VB. family Vs C family (IT Professionals' Lounge)
- 2D Vector (C++)
- GUI with C++ (C++)
- game progrming (Computer Science)
Other Threads in the C++ Forum
- Previous Thread: Arrays
- Next Thread: Arrays of arrays
| Thread Tools | Search this Thread |
api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray 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 news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






