pcboyyyy's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Active Members
Active Posts:
81 (0.05 per day)
Joined:
29-August 10
Profile Views:
7,472
Last Active:
User is offline Oct 19 2014 01:19 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Mitsubishi
Dream Kudos:
0

Latest Visitors

Icon   pcboyyyy Help on my Calendar Event thread would be much appreciated.

Posts I've Made

  1. In Topic: Tip Calculator Help

    Posted 19 Oct 2014

    Look at my previous post for input how I did the calculation to round the bill up to the nearest $10.
  2. In Topic: Tip Calculator Help

    Posted 19 Oct 2014

    View Postinfernorthor, on 19 October 2014 - 01:08 AM, said:

    Math.ceil(double); exists.


    Right, I'm aware. Thanks.

    So, I tried this:

    double totalRound = (int) Math.ceil(totalWithTaxAndTip / 10) * 10;
    double totalChange = totalRound - totalWithTaxAndTip;
    
    
  3. In Topic: System call a command from within a program

    Posted 18 Sep 2014

    View PostSalem_c, on 18 September 2014 - 10:25 AM, said:

    > Is forking really necessary?
    That's for you to decide.

    Were you planning on having your code stick around to do something else after the dd had finished?
    If so, the answer is yes.


    Ok, so I misread your first reply to me. I am trying to only run a program within a program. I want to use dd to make it happen.

    so, if I were use to system(command) how would the code differ that you already posted, obviously since it is not starting a new process forking will not be needed.

    View Postno2pencil, on 18 September 2014 - 10:04 AM, said:

    View Postpcboyyyy, on 18 September 2014 - 12:57 PM, said:

    Is forking really necessary?


    Why would you use C or C++ to call dd? Why not use a shell script? I mean if we're talking about what is or isn't necessary...


    I'm open to any ideas at this point and I did think of that as a solution.
  4. In Topic: System call a command from within a program

    Posted 18 Sep 2014

    [quote name='Salem_c' date='17 September 2014 - 11:08 PM' timestamp='1411020494' post='2053108']
    system("command"); is the simple, quick and dirty way of running one program within another.

    The exec() functions are the correct way of running another process, but it takes a lot more effort on your part.

    Is forking really necessary?
  5. In Topic: System call a command from within a program

    Posted 17 Sep 2014

    View Postkugy, on 17 September 2014 - 09:46 PM, said:

    system (command);
    


    no, it has something to do with:

    execv or execl

    and this library:

    #include <unistd.h>

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Interests:
Engineering, software, hardware, computers, reading, golf, e-commerce, business, networking, retail.
Years Programming:
12
Programming Languages:
VB.NET, C#, C++, C, Java, PHP, CSS, HTML.

Contact Information

E-mail:
Click here to e-mail me

Comments

pcboyyyy has no profile comments yet. Why not say hello?