User Profile

Collapse

Profile Sidebar

Collapse
Geddes
Geddes
Last Activity: Feb 15 '07, 03:54 AM
Joined: Feb 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Geddes
    replied to Isolating numbers in a for statement
    in C
    Actually I think i'm beginning to understand a bit better. If i declare a vector and use the push back command to add every number produced by the factoring code, I should be able to simply access the number later using: vectorname[a number]. Can you correct me if i am wrong?
    See more | Go to post

    Leave a comment:


  • Geddes
    replied to Isolating numbers in a for statement
    in C
    I read that tutorial, and i think i understand what vectors do; however, i'm still not sure how to apply them to my code. Do I modify the if statement so that my xyvar variable is a vector? Even then, how do I access these numbers later?

    thanks...
    See more | Go to post

    Leave a comment:


  • Geddes
    replied to Isolating numbers in a for statement
    in C
    array preferably..i don't even know how vectors work.
    if a vector is more efficient or better in some way i'm up to learning it though.

    thanks for the quick response....
    See more | Go to post
    Last edited by Geddes; Feb 10 '07, 07:48 AM. Reason: wrong grammar

    Leave a comment:


  • Geddes
    started a topic Isolating numbers in a for statement
    in C

    Isolating numbers in a for statement

    I'm making a program which factors a number which is given by a user. I've gotten a way to output the factors using a for statement, but i would like, if possible to isolate the numbers which are given as factors so i can use them at a later time. I'm a C++ noob, so if there is a simple answer to this, don't be afraid to point it out =)
    Code:
    #include <iostream.h>
    #include <math.h>
    
    using namespace std;
    ...
    See more | Go to post
No activity results to display
Show More
Working...