Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Tags
Member Avatar for fka

Hi there, I'm writing some application based on Qt and C++ and I've reached the problem. How to display window via clicking, triggering, etc. I wrote some code: //---------------------------- // THIS IS IN mainwindow.h //---------------------------- #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : …

Member Avatar for mike_2000_17
0
191
Member Avatar for fka
Member Avatar for fka

Hello. I have some problems with recieving text from ListBoxItem. My code is below: ListBox list = (ListBox)this.FindName(e.Parameter.ToString()); ListBoxItem item = (ListBoxItem)list.Items.GetItemAt(0); //****here is exception**** T.Text = item.Content.ToString(); list.Items.RemoveAt(0); The exception throws: Unable to cast object of type 'System.String' to type 'System.Windows.Controls.ListBoxItem'. My ListBox contains numbers, but it does not …

Member Avatar for fka
0
180
Member Avatar for fka

Hello. Everything I have to do is just changing some specific text from first file to another text. I have a clue - read first file character by character to array while character != space. After that compare array with my replacement text and decide what action will be performed. …

0
59
Member Avatar for fka

Hi everyone, I wrote something like that: [CODE] book *library = NULL; customer *service = NULL; do { printf("**********MENU***********\n"); printf("* #1 List of books *\n"); printf("* #2 Add book *\n"); printf("* #3 Search by title *\n"); printf("* #4 Search by category *\n"); printf("* #5 Search by author *\n"); printf("* #6 …

Member Avatar for fka
0
288
Member Avatar for fka

Hello. I'm writing Windows Form App and I found "tiny" trouble. I can't manage with finding control by a name. I have this code: [CODE]private Control FindByName(string name) { foreach (Control c in this.Controls) { if (c.Name == name) return c; } return null; }[/CODE] and simply it doesn't return …

Member Avatar for ddanbe
0
289
Member Avatar for fka

Hello, I have a list of strings. It contains strings with NAMES of my objects. This mean: [CODE]First f1 = new First(); Sec f2 = new Sec(); Third f3 = new Third();[/CODE] And my list contain: [CODE] List<string> smth = new List<string>(); First, Sec, Third[/CODE] How can I create object …

Member Avatar for Momerath
0
97
Member Avatar for fka

[CODE] //file included from main.cpp #include <iostream> #include <ctime> void generate(int height, int width) { int i,j,random,x,y,check; char map[height][width]; bool way[4], border[3]; srand(time(NULL)); //[error 'srand' was not declared in this scope] for(i=0; i<height; i++) { for(j=0; j<width; j++) map[i][j] = 178; } x = rand()%height; //[error: 'rand' was not declared …

Member Avatar for mrnutty
0
199
Member Avatar for fka

My array $pids contains integers. For example: 18742 59274 94255 97124 18742 94255 94255 I wrote: [CODE]$pid = array_unique($pids); for($i=0; $i<count($pid); $i++) echo $i.' '.$pid[$i].'<br />';[/CODE] And the output is: 0 18742 1 2 3 What's wrong? Why array_unique() doesn't throw away duplicated values?

Member Avatar for smantscheff
0
99
Member Avatar for fka

Hi. I have a troubble with reading string from file and saving it in a structure. Here's my code: [CODE] FILE*t; t=fopen("file.txt", "r"); wt=(pointer)malloc(sizeof(list)); w=wt; for(i=0; i<3; ++i) { w=(pointer)malloc(sizeof(list)); fscanf(t, "%d", &w->id_t); fscanf(t, "%s", &w->name); fscanf(t, "%f", &w->price); fscanf(t, "%d", &w->tax); printf("%d\n", w->name); //for check w->next=NULL; fscanf(t, "%c", &c); …

Member Avatar for WaltP
0
152
Member Avatar for fka

I have a problem. I wrote: [CODE] for(i=0; i<n; i++) { m++; char **exP = realloc(exParam, m*sizeof(*exParam)); char **exT = realloc(exText, m*sizeof(*exText)); exParam = exP; exText = exT; explode = strtok(lines[i], "#"); while(explode != NULL) { exParam[m-1] = malloc(strlen(explode+1)); strcpy(exParam[m-1], lines[i]); exText[m-1] = malloc(strlen(explode+1)); strcpy(exText[m-1], explode); explode = strtok(NULL, "#"); …

Member Avatar for Narue
0
174
Member Avatar for fka

I have to read text file line by line to multidimensional array. I have this code: [CODE] char *data; data = (char*)malloc(size_d); while(fgets(data, size_d, fp) != NULL) { printf("[%d] %s ", strlen(data), data); } [/CODE] I want to put every line to char array. Some suggestions?

Member Avatar for fka
0
132