Search:

Type: Posts; User: Federal102

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    1,640

    Yup .

    Yup

    .
  2. Replies
    7
    Views
    1,640

    eg bool isPrime(int num) { //psuedo...

    eg




    bool isPrime(int num)
    {
    //psuedo code;
    if(num is prime)
    return true;
  3. Replies
    7
    Views
    1,640

    Couple of points. 1. Your code does not...

    Couple of points.

    1. Your code does not display primes - it displays integer values incremented by 2 each time.

    2. << is a binary operator that takes an ostream& as the first argument and your...
  4. Thread: Need help

    by Federal102
    Replies
    4
    Views
    987

    You were very close... Just move...

    You were very close...

    Just move fout("ass2.run") to the top of your code (between main and int n), and replace all of your couts with fout. This will write your triangle to the file.
  5. Replies
    10
    Views
    1,222

    .h is non standard

    .h is non standard
  6. Replies
    10
    Views
    1,222

    To do this the "C++" way you should use...

    To do this the "C++" way you should use std::string instead of char *.

    Something like this..


    #include <iostream> //DO NOT USE .h headers
    #include <string>
    using namespace std;
  7. Replies
    2
    Views
    3,550

    Another very simple way to do this would be to...

    Another very simple way to do this would be to read in the lines and insert each one into a std::set. If the insertion succeeds print out the line. If the insertion fails (sets do not allow...
Results 1 to 7 of 7