Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
4
Posts with Upvotes
3
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #4K
~12.0K People Reached
Favorite Tags
Member Avatar for bunnyboy

How can I cast a base class to a derived on at runtime. What I am trying to do is the following: I need a system which will hold the subscriptions, where a certain type of message, has an assigned Subscriber. When a message is received, it will bi forwarded …

Member Avatar for bunnyboy
0
234
Member Avatar for bunnyboy

Yesterday I started playing with Microsoft CTP async library and I came across awaitable pattern ... I followed some tutoral, but I have a newer version of ctp that tutorial was refering to so all info about that was useless. After looking over the internet how the new pattern looks …

Member Avatar for kvprajapati
0
205
Member Avatar for bunnyboy

Hello! I'm having problem with getting the checkbox state of a selected row inside table. I don't know if there is any specific function to determinate which row is selected so I've thought of the following... when the row is selected, style(background color) is applied to the tr element, so …

Member Avatar for migcosta
0
3K
Member Avatar for bunnyboy

Consider those two function. When I load file, everything is fine, but then, when I want to save changes, the file is still being locked. Where is the catch? [CODE=C#] public static string Load(string loadPath = null) { string output; string file = loadPath == null ? _defaultFile : (_defaultFile …

Member Avatar for bunnyboy
0
207
Member Avatar for vbx_wx

How can i calculate an expresion of type string: [code] strng eval = "129 + 23 - 54 * 2 / 4"; [/code] Any ideas?

Member Avatar for bunnyboy
0
89
Member Avatar for bunnyboy

Can someone explain me why this string extended method gives me an ArgumentOutOfRangeException (Index and count must refer to a location within the string. Parameter name: count), [CODE=C#] public static string Remove(this string str, char lower, char upper) { return str.Where(ch => ch <= upper && ch >=lower) .Aggregate(string.Empty, (current, …

Member Avatar for apegram
0
245
Member Avatar for bunnyboy

So for example, I have an array like that: [CODE=C#]char[] pattern = "GCAGAGAG".ToCharArray();[/CODE] And what I would like to do is to extract out distinct values and its corresponding indexes(smallest one) from right to left where first letters does not count. example: reversed array: [COLOR="Green"]GAGAGACG[/COLOR] Distinct values are: [COLOR="Red"]A, C, …

Member Avatar for bunnyboy
0
99
Member Avatar for bunnyboy

Hello guys! At school we were given a homework to read some info from web page and display it. While surfing over net for some infos how to approach to this a came across at HTML Agility Pack. I decided to use it. But I have some problems with parsing …

Member Avatar for bunnyboy
2
176
Member Avatar for bunnyboy

So today at school I was given a task to create an application to apply convolution over image. I decided to load convolution cores from xml file. But, as this was the first time me working with xml I have no knowledge how to effective parse it. So here is …

Member Avatar for bunnyboy
1
101
Member Avatar for bunnyboy

So I have the following implementation of linked list: [CODE=c] #ifndef LINKED_LIST #define LINKED_LIST struct Student { char* name; char* surrname; char* signin_number; char* grade; char* date; struct Student* next; }; struct Student* begin = NULL; void push_back(struct Student* student) { struct Student* temp = NULL; if(begin == NULL) { …

Member Avatar for bunnyboy
0
95
Member Avatar for bunnyboy

So I am making a windows explorer like program and I want to implement file copying with streams ... so here i what I end up with: [CODE=c#] try { using (Stream input = new FileStream(@"F:\dmd-sepdawn.avi", FileMode.Open)) using (Stream output = new FileStream(@"c:\test\dmd-sepdawn.avi", FileMode.OpenOrCreate)) { int bufLength = 1024 * …

Member Avatar for sknake
0
129
Member Avatar for bunnyboy

So I would like to make a function which would add elements in container in sorted manner. Let's say we have a struct with two integer. I randomly initialize them and the add it to deque. And now what I want is that my function would add them in a …

Member Avatar for Clinton Portis
0
133
Member Avatar for bunnyboy

Hey, For my assignment I have to create a dialog with 6 radio buttons and one picture control. Radio buttons serves for setting the background color of picture control. Whenever the radio button selection is changed, background color is set to to its color settings. So I created Group Box, …

0
77
Member Avatar for bunnyboy

Can someone explain what am I doing wrong? I get "vector subscript out of range" error. Here is the sample ... [CODE=cplusplus] #include <vector> using std::vector; struct CUBE { int number; bool changed; }; int _tmain(int argc, _TCHAR* argv[]) { vector<CUBE *> cube; for (int i = 0; i < …

Member Avatar for bunnyboy
0
4K
Member Avatar for noamco

I have a strange bug in vs2008. ostream open fails when called in the following manner: [CODE=c++]ofstream filestr; filestr.open((filename.c_str()),ios::in|ios::out);[/CODE] when called like this it works without a hitch: [CODE=c++]ofstream filestr; filestr.open("blahblah.txt",ios::in|ios::out);[/CODE] Any ideas? Thanks

Member Avatar for noamco
0
161
Member Avatar for kangarooblood

I've been trying to do a really easy game here, the thing is that the when a player reaches 0, it just keep going to -5 and such like. WHat's wrong? [code=c++] #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main () { srand(time(0)); int player1 = 100; …

Member Avatar for bunnyboy
0
105
Member Avatar for Manikyr

Hi! My assignment is to write a program where you write in two sport teams, home teams and guest team and their reults. After the program will output information who won and if there were a tie. I tried to translate okay from Swedish! The program isn't working and there …

Member Avatar for kangarooblood
1
439
Member Avatar for kangarooblood

I'm quite new too C++ but finally my experience is good enough to actually create something, that's what I thought... So I triedto make this easy Tic Tac Toe Game and I think i got it all right but obviously not cause when I try to choose somewhere to put …

Member Avatar for Sky Diploma
0
215
Member Avatar for mirfan00

I want to enter password in asteriks and compare it from the file. I compare it but i cannot able to show it in asteriks.If someone knows please solve it ?

Member Avatar for Narue
0
182
Member Avatar for bunnyboy

So, i wrote stack, which is using vector strategy in case of being too small. The code compiles well and works until the resize function is called to resize the size of array. Tnx for any help solving this error. [CODE=cplusplus]#ifndef STACK_H #define STACK_H const int DEFAULT_SIZE = 10; template …

Member Avatar for bunnyboy
0
108
Member Avatar for Toila

[CODE=c]#include <stdio.h> #include <string.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 void Result (char *result, char string, char remove); char *RemoveChars( char *src , char *key ); int main(void) { char string[] = "Alesia"; char remove[] = "aeiou"; char result; Result (&result, string, remove); fflush(stdin); printf(" Press any key …

Member Avatar for WaltP
0
2K
Member Avatar for bunnyboy

I have to write a template that would swap two arguments, if second one is smaller than first. But in case of string beeing passed to function it would swap them, if second is smaller than first by length. Is it possible to implement that using just one template? Here …

Member Avatar for bunnyboy
0
115
Member Avatar for bunnyboy

Hello! I am making a postfix calculator and I want to add in some equation integrity checking. Everything seems to work ( it needs to be done some little improvements, but overall it is working), except when I am checking for the blank spaces the program do not work the …

Member Avatar for bunnyboy
0
156
Member Avatar for bunnyboy

Hello! So, I have a problem with the following code... I'd like to know, why the variables pid and ppid are not initialized? Inside the if scope, if I print them out, they are initialized to getpid() and getppid() value, but when I want to print them out in else …

Member Avatar for bunnyboy
0
110