User Profile

Collapse

Profile Sidebar

Collapse
rjddude1
rjddude1
Last Activity: Dec 11 '09, 12:28 AM
Joined: Aug 12 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Linker error gone



    Linker errors are gone however my reduction function does not work.
    How do I make it so that it stores the function in reduced form and reduces them before they are printed.

    Thank you in advance.

    Here's my function implementation file

    Code:
    #include "Rational.h"
    
    Rational::Rational()
    : is_valid_( false ), num
    ...
    See more | Go to post

    Leave a comment:


  • Rational Class help. Reduction funtion doesnt work. Linker error in Dev cpp.

    I created a rational class, created member functions to add, subtract, multiply and divide. The reduction function however doesn't work. And the Dev cpp compiler gives a linker error. I have attached the header, implementation and the driver file in rational.zip
    Could you help me fix this code?
    What am I doing wrong?...
    See more | Go to post

  • rjddude1
    started a topic Sorting help
    in C

    Sorting help

    I need to only get the first line from the file (until it encounters first period [.]) and also sort the output in descending order. could you help me out here?
    Code:
    //function declaration
    void countLetters( string s )
    {
      int pos, sum = 0;
      char m;
      ofstream outfile;
      outfile.open( "output.txt" );
      outfile << "Letter" << "\t" << "Occurences"
    ...
    See more | Go to post

  • rjddude1
    started a topic Which one is better and why?
    in C

    Which one is better and why?

    Is recursive function for calculating Fibonacci series or iterative function is better?
    ITERATIVE:
    Code:
    int fibonacci_iterative(int n)      //Iterative formula for fibonacci series
    {
      int f0 = 0;
      int f1 = 1;
      int i, fn;
      
      if (n == 0)
            return 0;
      if (n == 1)
            return 1;
            
      for(i = 2; i <= n; i++)
      {
        fn =
    ...
    See more | Go to post

  • Thank you very much.
    This was very helpful. I really appreciate your help.

    Regards

    RD
    See more | Go to post

    Leave a comment:


  • There are 6 more rows like this below:
    Now I want a way to use the function showprice1 and calc1 in those 6 rows.

    Code:
    function showprice1()
    {
    var itm=document.getElementById("item1");
    document.getElementById("unit1").value=itm.options[itm.selectedIndex].value;
    }
    <tr>
    <td><select id="item1" onchange="showprice1()">
    <option value=0.00
    ...
    See more | Go to post

    Leave a comment:


  • How to insert a valueof variable into text box?

    Well I know how to pass value of an item from drop down list to a text box, but this ones different. I'm very new to javascript and have no idea how to pass value calculated variable into a text box.
    Code:
    function calct()
    {
    var un1=document.getElementById("unit").value;
    var qn1=document.getElementById("qty").value;
    var x1=eval(un1);
    var y1=eval(qn1);
    var z1=eval(x1*y1);
    document.getElementById("subtl").value=
    ...
    See more | Go to post
    Last edited by rjddude1; Aug 12 '09, 07:03 PM. Reason: I forgot to mention something
No activity results to display
Show More
Working...