Search found 49 matches

by Big_Lebowski
Fri Aug 21, 2009 8:00 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

leiradella wrote:A void * is an untyped pointer, a pointer that cannot be deferenced. As an example. it’s used as the return type of malloc, ...........

Cheers,

Andre
Thanks Andre, your reply really helped me, sorry, can't mark your post as Accepted Answer, cause did it mistakenly earlier...
by Big_Lebowski
Fri Aug 21, 2009 2:28 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

TrV wrote:
Big_Lebowski wrote:I got same address for both "(void *)&k" and "&k".
I would say "fortunately!" ;)
I would say too :D but can't get this awful "(void *)" sense :D
by Big_Lebowski
Fri Aug 21, 2009 2:13 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

Thank you TrV.

When I compile code:

Code: Select all

printf("k has the value %d and is stored at %p\n", k, (void *)&k); 
and code:

Code: Select all

printf("k has the value %d and is stored at %p\n", k, &k); 
I got same address for both "(void *)&k" and "&k".
by Big_Lebowski
Fri Aug 21, 2009 2:07 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

:))))) Thank you very much upCASE :)))))

I know "&k -> address of k" :)))
as well I know "*k -> contents of what K points to." :)))

I just can't understand why to use "(void*)" before "&k", cause "&k" without "(void*)" has same value :))
by Big_Lebowski
Fri Aug 21, 2009 1:37 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

This code from Pointers Tutorial: http://pweb.netcom.com/~tjensen/ptr/ch1x.htm
by Big_Lebowski
Fri Aug 21, 2009 1:30 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

Thank you upCASE.

I mean for what use "(void*)" before "&k" in this code:

Code: Select all

 
       printf("k has the value %d and is stored at %p\n", k, (void *)&k);

"&k" is reference not pointer but (void *) looks like pointer (pointer that points nowhere),
it looks strange...


Thanx.
by Big_Lebowski
Fri Aug 21, 2009 1:00 pm
Forum: C++ Development
Topic: (void*) What does it mean?
Replies: 11
Views: 1101

(void*) What does it mean?

Hi all, I see often (void*) For example: #include <stdio.h> int j, k; int *ptr; int main(void) { j = 1; k = 2; ptr = &k; printf("j has the value %d and is stored at %p\n", j, (void *)&j); //j has the value 1 and is stored at 00403374 printf("k has the value %d and is stored at %p\n", k, (void *)&k);...
by Big_Lebowski
Tue Jun 09, 2009 7:18 pm
Forum: C++ Development
Topic: wxBookCtrl: disable single page
Replies: 8
Views: 868

It looks like you need to set:

Code: Select all

m_panel->Enable( false );
by Big_Lebowski
Thu Jun 04, 2009 10:10 am
Forum: wxWidgets Development (Russian)
Topic: как достать wxListCtrl
Replies: 3
Views: 1398

Разобрался.... проблема была не wxListCtrl, а в ошибке при определении wxApp, формы я делал в формбилдере, там интерфейс в отдельном файле а главный фрейм с обработчиками в другом файле.... дак вот при инициализации wxApp нужно было указывать фрейм производный от дочернего класса интерфейса, а я ука...
by Big_Lebowski
Thu Jun 04, 2009 8:17 am
Forum: C++ Development
Topic: wxBookCtrl without any tabs?
Replies: 5
Views: 1582

Then I guess you don't need wxBookCtrls at all, just several wxPanels, one of them visible, all another hid, but all of them have same position. It lets to manage visibility from outside....
by Big_Lebowski
Tue Jun 02, 2009 11:52 am
Forum: Database Related
Topic: wxSqlite3 issue
Replies: 11
Views: 4249

Re: wxSqlite3 issue

........ For GUI projects you might get some inspirations from this project: http://code.google.com/p/wxquickrun/ ......... Regards, Ulrich I have been trying to build that project several times, but failed. If you have Visual C++ Express Edition, CodeBlocks or DevC++ you won't be able to build it,...
by Big_Lebowski
Mon Jun 01, 2009 6:03 am
Forum: wxWidgets Development (Russian)
Topic: как достать wxListCtrl
Replies: 3
Views: 1398

Привет-привет. Вообще говоря, я сейчас пишу небольшую утилитку, в основном окне которого как раз такая же схема элементов (в том числе wxListCtrl). И все действия у меня прописаны в статической таблице событий основного фрейма. Я так полагаю, проблема не в том, что ты "не можешь добраться" до wxLis...
by Big_Lebowski
Sun May 31, 2009 8:12 pm
Forum: wxWidgets Development (Russian)
Topic: как достать wxListCtrl
Replies: 3
Views: 1398

как достать wxListCtrl

Всем привет, я новичек в wxWidgets, не могу понять как мне получить доступ к свой свойствам дочернего объекта. На пример, у меня есть MainFrame на ней wxBoxSizer в нем wxNoteBook а этом буке есть wxPanel в которой сидит еще один wxBoxSizer а в нем уже сидит главная цель всего кода wxListCtrl. В друг...
by Big_Lebowski
Sun May 24, 2009 12:55 pm
Forum: C++ Development
Topic: wxSQLIte3, how to tie wxTextCtrl* and ExecuteUpdate()?
Replies: 8
Views: 1395

The question is withdrawn, I just deleted "s_col++;" statement :) All works OK :)
by Big_Lebowski
Sun May 24, 2009 11:23 am
Forum: C++ Development
Topic: wxSQLIte3, how to tie wxTextCtrl* and ExecuteUpdate()?
Replies: 8
Views: 1395

Now, there are troubles with iserting datas into wxGrid... I have this code: void PBGUI_MainFrame::OnQueryClick( wxCommandEvent& event ) { wxSQLite3ResultSet set = db.ExecuteQuery("SELECT * FROM phones"); int s_col = 0; while (set.NextRow()) { wxString s_phone = set.GetAsString(_T("phone_id")); wxSt...