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
~69.9K People Reached
Favorite Tags

51 Posted Topics

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
154
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
231
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
143
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
258
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
258
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
158
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
178
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
257
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
149
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
127
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
127
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
132
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
65
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
102
Member Avatar for babyhuyx
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
668
Member Avatar for BoBok2002
Member Avatar for WolfShield
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
163
Member Avatar for a.muqeet khan

You just do your code on paper.. then you will find out already. *When you do, must follow code not follow what you planned. It's a sequence problem...

Member Avatar for a.muqeet khan
0
223
Member Avatar for meli123
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
163
Member Avatar for grimreaperx2

You can try debug yourself by just modified your code. e.g. [CODE] for(int x=strl1; x>=0; x--){ cout<<"Current x: "<<endl; //test cout<<"=======\n"; //test sum=num2[x]+num1[x]+carry; cout<<"sum is "<<sum<<endl; //test carry=sum-10; cout<<"carry is "<<carry<<endl; //test if(carry<=0){ carry=0; sum=10%sum; } total[x]=sum; cout<<"total[x] is "<<total[x]<<endl; //test } for(int i=0; i<strl1+1; i++){ cout<<total[i]; }[/CODE]

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
155
Member Avatar for meli123

If you want to make 0.999 become 1 then you use ".round ". Else f you want prove it mathematically then try this [url]http://en.wikipedia.org/wiki/Limit_(mathematics[/url]). Write your code for this equation. I never try. XD

Member Avatar for doug65536
-1
272
Member Avatar for hopper24

This is the way to use constructer [url]http://en.wikipedia.org/wiki/Constructor_(object-oriented_programming[/url]).

Member Avatar for hopper24
0
205
Member Avatar for ryandunn

go step by step debug yourself. You can put cout for your interest/principle/moneyowned in every loop. So you can find out which is the error.

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

normally i do that with string. So user can enter whatever length/alpha/number they want. After that only write errorcheck function for the input.

Member Avatar for george08.08
0
3K
Member Avatar for Labdabeta
Member Avatar for murnesty
0
98
Member Avatar for Harley_Quinn

Is it because [CODE]void computeSum (vector<int> &Vec, int howMany, int total, bool success) cout << "Your total is " << computeSum(dataVec, howMany, total, success);[/CODE] has no return?

Member Avatar for Fbody
0
192
Member Avatar for meli123
Member Avatar for benap2

you have a same condition run through twice in a loop. So in the second condition will overlapse the first condition

Member Avatar for Dlx06
0
113
Member Avatar for murnesty

I having problem of sizeof returning a hexadecimal value which I want it return decimal here is my sample code: [CODE]#include <cstdlib> #include <iostream> #include "stringCascade.h" using namespace std; void StringCascade (void) { unsigned char ucA[] = {0x02, 0x6F, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x00, …

Member Avatar for tajendra
0
137
Member Avatar for murnesty

[CODE]union _Test { unsigned char keydata[4]; struct _Member { unsigned char a; unsigned char b; unsigned char c; unsigned char d; }Member; }Test; Test.keydata[4]= { 1, 2, 3, 4}; [/CODE] error on line 12: expected expression before '{' token. If I declare without union, [CODE]const unsigned char keydata[NUM_KEYS]={ 2, 1, …

Member Avatar for L7Sqr
0
2K
Member Avatar for murnesty

let say i have a class A (base) class B , C, D also inherit A [ multiple ] then class E inherit class B, C, D... But class E also want to inherit class A [ multilevel ] *I want to use class A protected function in class E... …

Member Avatar for Ancient Dragon
0
121
Member Avatar for ayanbizz

[QUOTE=fonzi;1518701]To install from a pen drive a.k.a usb flash drive Ubuntu.com has a great tutorial [URL="http://www.ubuntu.com/desktop/get-ubuntu/download"]http://www.ubuntu.com/desktop/get-ubuntu/download[/URL] here the link above and scroll down to step 2, choose weather you wish to create a cd or USB pen drive, it will give you detailed instructions on how to create a bootable …

Member Avatar for uv4u
0
173
Member Avatar for murnesty

I'm new on using class. Other than declare as friend class or declare static for the specific file to share variables/functions. Is there any other way? I have inherit few classes and wrote into few *.cpp file. I can't extern a static file, so is that mean i just only …

Member Avatar for mrnutty
0
138
Member Avatar for murnesty

I'm using eclipse C++ helios and mingw compiler... I created a hello world project without modify the original code.. It compile successfully but when i click run, it show terminated test.exe I'm new to use eclipse IDE, so hope to get some helps here.. thanks

Member Avatar for murnesty
0
209
Member Avatar for mrnutty
Member Avatar for daino

Do you mean you want to input a set of data, and then output to excel spreadsheet? If so i did something like this before, you can use fstream to outfile with file extension *.csv. Use comma to next column and endline to next row.

Member Avatar for raptr_dflo
0
231
Member Avatar for emmaand

if you are using windows then can you use [CODE]system("exit");[/CODE]. The content inside the bracket of system() is your command prompt instruction.

Member Avatar for murnesty
0
8K
Member Avatar for murnesty

i searched about this error. they said is mostly caused by forgot putting semicolon... but i find for 1hours+ still cant find out >.< anyone can help me? the error is pointing test.h lines 9: multiple types in one declaration test.h: [CODE]#ifndef TEST_H_ #define TEST_H_ class TEST { public: //call …

Member Avatar for Kanoisa
0
1K
Member Avatar for murnesty

our arm9 board kernel os version is just able to support 2.6.13 or below. and we fail to update the new kernel os version. So we decide to find a arm-linux-gcc version that fit the kernel os version. Anyone knows which arm-linux-gcc version fit? we tried arm-linux-gcc 4.4.3 and 4.3.2. …

Member Avatar for rubberman
0
133
Member Avatar for murnesty

I'm newbie on arm9 and linux OS. I hope i can get some clue how to start on interact between my pc and arm board. Im using ubuntu 10.10 and i haven download the arm-linux-gcc yet. I have a OSAP L138 with ARM 9. I can successfully power on and …

Member Avatar for rubberman
0
158
Member Avatar for emanfman

[CODE]#include <iostream> #include <string> using namespace std; int main(void) { string name; string name2 = "Test"; cin>>name; cout<<"string : "<<name<<endl; name.append(name2); cout<<"string : "<<name<<endl; system("pause"); return EXIT_SUCCESS; }[/CODE] this work to for using string lib

Member Avatar for emanfman
0
147
Member Avatar for murnesty

[B]In main.cpp[/B] [CODE]#include <iostream> #include "init.h" using namespace std; Initialization Init; int main() { Init.test(); return 0; } [/CODE] [B]In init.cpp[/B] [CODE]#include <iostream> using namespace std; class Initialization { public: void test() { for(int i=0; i<10; i++) { cout<<i; } } };[/CODE] [B]In init.h[/B] [CODE]#ifndef INIT_H_ #define INIT_H_ class Initialization …

Member Avatar for murnesty
0
145
Member Avatar for murnesty

I searched from internet. They said have 2 ways to create sub-function file, first way is : using header file which is easier to write. second way is: using cpp file which will increase the compilation time. But my lecturer say using header file to write sub-function is a wrong …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Lokril
Member Avatar for clickspiker23

Two ways: 1. using class: declare midPointX and midPointY as public int, then it can be access from other class or main. 2. return x*1000 +y. Then when you getting the value, you have to undo the process to get back two values x and y.

Member Avatar for JasonHippy
0
140

The End.