User Profile

Collapse

Profile Sidebar

Collapse
Undermine
Undermine
Last Activity: Oct 28 '08, 02:36 AM
Joined: Oct 16 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Undermine
    started a topic C++ help
    in C

    C++ help

    [PHP]#include <iostream>

    int main()
    {
    using std::cout;
    using std::endl;
    using std::cin;

    int value, count=0, sum=0, average,total, smallest, largest;

    for(;;) // i.e. loop forever .... until break
    {
    for(;;) // ever ...
    {
    cout << "Enter value " << count+1 << ":...
    See more | Go to post

  • Undermine
    replied to Pointer Question
    in C
    Hello boxfish thanks for the help, the pointers are supposed to store the value given by MPG, because each time in the loop i will assign different values for miles and gallons and i need it to store the output for each loop into a certain variable so i can average them later.

    Basically im trying to reference as an elemental in my array, how do i do that. Say i want the first element in my MPG array, how do i reference it ?
    ...
    See more | Go to post
    Last edited by Undermine; Oct 21 '08, 03:32 AM. Reason: more input

    Leave a comment:


  • Undermine
    started a topic Pointer Question
    in C

    Pointer Question

    [PHP]#include <iostream>
    #include <vector>


    using std::cout;
    using std::cin;
    using std::endl;


    int main(void)
    {
    int x;
    x=0;
    while ( x < 3 )
    {
    int m1;
    int m2;
    int m3;
    int a[] ={m1,m2,m3};
    cout<<"Enter the Miles used (-1 to quit):" << endl;
    cin>> a[x];
    ...
    See more | Go to post

  • Undermine
    replied to Real Fast While Loop Question
    in C
    thanks both of you got it :)
    See more | Go to post

    Leave a comment:


  • Undermine
    started a topic Real Fast While Loop Question
    in C

    Real Fast While Loop Question

    [PHP]#include <iostream>

    using std::cout;
    using std::cin;
    using std::endl;


    int main(void)
    {

    int m1;
    int g1;
    int x=1;
    int MPG;
    m1=287,200,120;
    g1=13,10,5;


    while ( x <= 3 )
    {
    MPG= m1/g1;
    cout<<" MPG this tankful:" << MPG << endl;
    x++;
    ...
    See more | Go to post

  • Undermine
    started a topic Need classes help.
    in C

    Need classes help.

    This is my header file.

    [PHP]#include <string>
    using std::string;

    class Employee
    {
    public:
    Employee(string ,string,int) ;
    void setFirstName( string );
    string getFirstName();
    void setLastName( string );
    string getLastName();
    void setMonthlySalar y(int);
    ...
    See more | Go to post
No activity results to display
Show More
Working...