horace's Profile User Rating: *****

Reputation: 542 Enlightened
Group:
Expert
Active Posts:
2,852 (0.84 per day)
Joined:
25-October 06
Profile Views:
12,530
Last Active:
User is offline Feb 03 2016 02:51 PM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
50

Latest Visitors

Icon   horace has not set their status

Posts I've Made

  1. In Topic: How to Replace Four Main Math Action With -- and ++?

    Posted 3 Feb 2016

    1. you can do division / and modulus % using sucessive subtraction
    2. if you you cannot use the subtraction operator - you can subtract using the -- operator
    e.g. to subtract y from x
    while (y)
        { x--; y--; }
    
    

    you can then use such code to do / and %
  2. In Topic: How to Replace Four Main Math Action With -- and ++?

    Posted 3 Feb 2016

    as I mentioned in post #2 you can use subtraction to carry out division / (and modulus %)
    http://www.bbc.co.uk...ted-subtraction
  3. In Topic: How to Replace Four Main Math Action With -- and ++?

    Posted 3 Feb 2016

    you cannot rely on a local variable being initialised, i.e. it takes whatever value is in the memory location allocated
    int n,i,cnt;
    

    if you want cnt to be 0 on program startup initialise it
    int n,i,cnt=0;
    


    you can use subtraction as a replacement for / and %

    have a look at
    https://primes.utm.e...ove/merged.html
  4. In Topic: Add character to output?

    Posted 3 Feb 2016

    have a look at manipulating and itterating strings
    https://docs.oracle....nipstrings.html
    http://stackoverflow...ars-in-a-string
  5. In Topic: Add character to output?

    Posted 2 Feb 2016

    your
    String name = "JOE\tDIRT";
    

    is in effect an array and you can use the CharAt() method to index thru it
    https://docs.oracle....charAt%28int%29

My Information

Member Title:
D.I.C Lover
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Norwich UK
Interests:
C/C++ including embedded code for dsPIC, PIC24, PIC32 and TMS320C6711
C#, VB.NET, Java
client/server applications using TCP, UDP, RMI, etc
Computer hardware, microcontrollers, interfacing, e.g. I2C, SPI, CANBUS, etc
Years Programming:
30
Programming Languages:
C,C++,Java,C#,VB.NET

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Comments

Page 1 of 1
  1. Photo

    GautamMohan Icon

    20 Sep 2015 - 01:12
    I want to know how to code to communicate between two single board computers. In my industry we used Fastwel, Octagon system single board computers. We use Rs-485 for communication between these processors. What is the best way to start. I have knowledge on basic and c++ programming but hardware to hardware interaction i have no idea. Please help on learning this aspect.
  2. Photo

    GautamMohan Icon

    20 Sep 2015 - 01:11
    hi
  3. Photo

    R@HUL Icon

    18 Jul 2015 - 00:13
    hey can you check your inbox please...
  4. Photo

    roosh.t3 Icon

    19 Jun 2015 - 23:42
    Hey, I need a help in C++, if you're willing to give a help :)
  5. Photo

    macosxnerd101 Icon

    31 May 2015 - 21:22
    Welcome back, horace! It's great to see you around DIC again. :-)
Page 1 of 1