Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #2K
~68.6K People Reached
Favorite Tags
Member Avatar for murnesty

I have a type casting question. I saw method 2 in my code and it able to compile (The code is not written by me). Can I know what method2 mean? method 1 is understandable. class Base {}; class Derived : Base {}; void main () { //let say I …

Member Avatar for Olyboy16
0
150
Member Avatar for murnesty

Hi, I'm looking for embedded system or os source code example. Just to learn some common error or good way to write some device process. Probably in C or C++. Is there any good suggestion?

Member Avatar for David W
0
228
Member Avatar for murnesty

I read a sample code from a development kits. The global array is declared without indicating the array size. I wonder is it safe? Here is the code: #include <stdio.h> // For Used Function printf // UART Buffer char uart0_buf[]; // "sprint" UART[0] Buffer char uart2_buf[]; // "sprint" UART[2] Buffer …

Member Avatar for deceptikon
0
139
Member Avatar for murnesty

I have develop a functor array without class but fail to write a functor relate to class. Here is the code without class int returnOne (void) { int a = 0; a++; return 10; } int returnTwo (void) { int a = 0; a++; return 20; } typedef int (*functor2) …

Member Avatar for mrnutty
0
250
Member Avatar for murnesty

I'm designing a embedded system and we have to oftenly report system fault in different code module. So I decided to create a source file to keep the error log and I'm building a struct for that. So that, every module reporting the error log and store in a data …

Member Avatar for mike_2000_17
1
245
Member Avatar for murnesty

I recently learn about the polymorphism and I don't know what is the purpose to use this feature. From http://www.cplusplus.com/doc/tutorial/polymorphism/ , it uses the child class rather than the parent class. I thought most of the time we inherit and we only use the parent class to access the child. …

Member Avatar for murnesty
0
156
Member Avatar for murnesty

Hi, I have a problem on search text from a string. I'm able to find it but my method is slow. Let say I got a string that contain items and I need to find out which items come first. So I find all the item by *.IndexOf("...").* Then find …

Member Avatar for ChrisHunter
0
170
Member Avatar for murnesty

I want to convert string to unsigned short. Example "123" equal to number 123 or 0x7B. But i get an error while doing the convertion : "Error 9 Cannot implicitly convert type 'int' to 'ushort'. An explicit conversion exists (are you missing a cast?)" Here is my code: UInt16 usTest …

Member Avatar for Momerath
0
250
Member Avatar for murnesty

Hi, I'm facing few problem on textbox : 1. I got plenty of textbox which roughly 500+ and my design haven't done so it might grow. Each of the textbox is represent data received from serial port. To update textbox then i need to write the code line by line …

Member Avatar for Momerath
0
143
Member Avatar for murnesty

I got only 1 form, which use to retrieve text from a text file. After that I need to do convertion(convertion of the text file) and display(display the converted text) as well. I manage to have 4 class which are Form1.cs, Convertion.cs, Display.cs and Database.cs. So Form1, Convertion and Display …

Member Avatar for Mitja Bonca
0
123
Member Avatar for murnesty

I know the purpose of keyword but then I still not really know when should i use. But I sure I will optimize my code. So is it ok to i use volatile keyword on all my variables? So that it won't optimize the wrong thing.

Member Avatar for mike_2000_17
0
119
Member Avatar for murnesty

The local pointer will be remove after i go out from that scope? or will remain? Example: int glb1 = 2; int main () { int var1 = 0; fnCall1(); fnCall2(); //at here } void fnCall1 () { int tmp1; tmp1 = 10000; } void fnCall2 () { int *ptr1; …

Member Avatar for rubberman
0
128
Member Avatar for murnesty

Hi I know it is unable to inherit 2 superclass and I know why because there is another thread discussing about this. But I just wonder is there a way to solve this problem?

Member Avatar for stultuske
0
63
Member Avatar for murnesty

Let say I have 9 boxes. Each box may randomly contain number 1-9.. Each box minimum contain no number, maximum contain 9 number and each box won't have duplicated number. My problem is how do I look for pairs/triple/quadruple of same number in different box. Eg. Box 1 : 1,2,5,6,7 …

Member Avatar for thines01
0
101
Member Avatar for babyhuyx

[CODE]int game = 3; int ckenonum; const int hkenostore = 4; int hkeno[hkenostore]; const int ckenostore = 4; int ckeno[ckenostore] = {1,2,3,4}; bool kenopass = false; for(int hkenostore = 1; hkenostore<4; hkenostore++) { do{ cout<<"Please enter a unique number between 1 and 15 (" << hkenostore << " of 3)\n"; …

Member Avatar for cutenaj12
0
2K
Member Avatar for murnesty

I'm using ARM nxp lpc2368. When I tried to add a assembly code in startup file. It show me a compilation error "invalid constant (e002c00c) after fixup". where the code is [CODE] mov r2, #0xE002C00C //address of PINSEL3 : 0xE002C00C[/CODE] when I refer to this link [url]http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/arm/Refcard.pdf[/url] It said in …

Member Avatar for murnesty
0
635
Member Avatar for BoBok2002

Hi,I spent all night trying to figure this out. Could someone take a look and show me what I'm missing? I getting this compiler error: [B]unterminated #ifndef [/B]. But I have [B]ifndef[/B] at the beginning and [B]endif[/B] at the end of the class. [CODE]//Header file. //Class definition for teh stack …

Member Avatar for BoBok2002
0
42K
Member Avatar for WolfShield

C++ was once the King of programming. It would crush any competitor! But, now it seems that C++ is getting less popular. New programmers are rushing to easier to learn, higher level, programming languages (e.g. Java). And with Microsoft coming out with C# which is gaining popularity (even though it …

Member Avatar for Netcode
0
1K
Member Avatar for D.M.
Member Avatar for murnesty

if i declare size 5 array [CODE]char ch[5]={'1','2','3','4','5'};[/CODE] Then the null will store at the address ch+5 ? even i didn't declare the size for the null to place. If so mean it may overlap value on that memory address?

Member Avatar for NP-complete
0
154
Member Avatar for a.muqeet khan

[CODE]// algo assignment.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int DATA[5]; DATA[0]=0; DATA[1]=10; DATA[2]=80; DATA[3]=1; DATA[4]=5; int a;int temp; int i,j; for (i=0;i<5;i++) { temp=DATA[i]; // at starting it means that it has value …

Member Avatar for a.muqeet khan
0
218
Member Avatar for meli123

Hey guys Im trying to create a code where: input A: number Input B: Base Print: Decimal form I am going to use algorithm where u do following: NUMBER % BASE but it would do it the number of times that the base is.. so if its 6 (base 2) …

Member Avatar for doug65536
0
111
Member Avatar for murnesty

It's my first time to use functor. So hope can get some guide here. My program need to call different function depend on input. so i thinking to use functor to do that. e.g. main.cpp [CODE]#include "functor.h" #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { …

Member Avatar for Eagletalon
0
157
Member Avatar for grimreaperx2

Well im having this problem on how to add large integers. I have used strings to take in a very large number something that can work on as many digits as you need it to. I take in 2 strings for the numbers you want to add. After which I …

Member Avatar for grimreaperx2
0
1K
Member Avatar for murnesty

I'm currently choosing which data structure to use for my data logging. Just want to ask for suggestion which type of data structure is better. It has limitation on memory either store in microcontroller RAM or SD card. - I can't know the total type of logging it has. (for …

Member Avatar for Narue
0
153
Member Avatar for meli123

heyyy guysss....just trying to make a code to proove .999=1 any ideass?? :)) ty!!

Member Avatar for doug65536
-1
262
Member Avatar for hopper24

#include <iostream> #include "Invoice.h" using namespace std; int main() { string description; double price; int quantity; cout << "Enter the description: "; getline(cin, description); cout << "Enter the unit price: "; cin >> price; cout << "Enter the quantity: "; cin >> quantity; cout << endl;//a new line //create an …

Member Avatar for hopper24
0
203
Member Avatar for ryandunn

I am trying to get the number of months on one side to pay a car loan off and then the other side to have a decrease in the money owned. I have been staring at this thing for about 2 hours and i dont understand why it won't subtract …

Member Avatar for Zvjezdan23
0
105
Member Avatar for george08.08

Hello. I am trying to validate a customer number using isdigit. If the user accidently enters a character other than an integer, I want it to allow the user to try again. The problem is it only will check the first number and if that is a digit it it …

Member Avatar for george08.08
0
3K
Member Avatar for Labdabeta

Quick question (though I still want to get my long OpenGL question fixed) is there a faster way to Xor the bits of an integer than this: [CODE](MyInt&0x1)^((MyInt&0x2)>>1)^((MyInt&0x4)>>2)//etcetera[/CODE] Just to clarify by faster I mean faster to execute, not to type as this operation will have to be done many …

Member Avatar for murnesty
0
93