Search:

Type: Posts; User: ashleyd

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    2,121

    I have never worked with vectors, is there a way...

    I have never worked with vectors, is there a way to fix my add function while still using an array? maybe something using const
  2. Replies
    7
    Views
    2,121

    //histogram.h #pragma once class histogram {...

    //histogram.h
    #pragma once
    class histogram
    {
    public:
    histogram(void);
    histogram(int numCount);
    ~histogram(void);
    void histogram::add(int numGenerated);
    void...
  3. Replies
    2
    Views
    1,598

    Help with error messages

    //main.cpp
    #include "aRandomNumber.h"
    #include "histogram.h"

    int main()
    {
    aRandomNumber die1();
    histogram histogram1(die1.getRange());
    for (int i=0; i<10; i++) //calls the add function...
  4. Replies
    7
    Views
    2,121

    Help with errors on my code!

    main.cpp:
    #include "aRandomNumber.h"
    #include "histogram.h"

    int main()
    {
    aRandomNumber die1 = new aRandomNumber();
    histogram histogram1 = new histogram();
    for (int i=0; i<10; i++) //calls...
  5. Thanks for the advice, I was able to get it...

    Thanks for the advice, I was able to get it working by putting a return; statement after each fprintf statement
  6. Sorry about that, I didn't read your last post...

    Sorry about that, I didn't read your last post untill after I posted my last post
    I did read the link you provided me with, and I did edit my code
    my new edited code is:

    void...
  7. Yeah this is a duplicate by mistake, caused by...

    Yeah this is a duplicate by mistake, caused by slow page loading
    so any ideas of what i can do to fix this?
    i am trying to print out an equation, in the form a + bi
  8. What is wrong with my code? using structs and fprintf

    I am working on a function for my project that formats the output of complex(imaginary) numbers, but when I run it, its not being formatted as i thought it would be.
    the struct being used is:

    ...
  9. What is wrong with my code? using structs and fprintf

    I am working on a function for my project that formats the output of complex(imaginary) numbers, but when I run it, its not being formatted as i thought it would be.
    the struct being used is:

    ...
  10. Replies
    7
    Views
    1,188

    When i ran that simple program i got: 0.000000...

    When i ran that simple program i got:
    0.000000 2.000000
  11. Replies
    7
    Views
    1,188

    Given: main.c ...

    Given:
    main.c

    /**************************************/
    /* main.c */
    /* DO NOT MODIFY THIS FILE */
    /**************************************/

    #include...
  12. Replies
    7
    Views
    1,188

    I replaced the %d's with %lf's, and now for the...

    I replaced the %d's with %lf's, and now for the output function errors i am getting:
    Output Function Errors:
    expected: 1 + 2i
    actual: 1.000000 + 2.000000i
    expected: 1 + 2i
    actual: 1.000000 +...
  13. Replies
    7
    Views
    1,188

    Structs and functions help

    I am working on a function for my project that formats the output of complex(imaginary) numbers, but when I run it, its not being formatted as i thought it would be.
    the struct being used is:

    ...
  14. Replies
    4
    Views
    3,279

    is there a way for me to find out exactly what...

    is there a way for me to find out exactly what the outf file handle does, because after looking at my documentation it says that the outf writes output to the stream pointed to by outf, which did not...
  15. Replies
    4
    Views
    3,279

    fprintf and outf

    I am currently working on a project, and am having trouble understanding part of the code
    A section of this code is:

    complex input_complex(FILE *infile)
    {
    complex z = {0,0};
    double re = 0,...
Results 1 to 15 of 15