Search:

Type: Posts; User: guda

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Wait for input..

    by guda
    Replies
    3
    Views
    2,489

    That helps... But how do I get it to wait... ...

    That helps... But how do I get it to wait...


    main (int argc, char *argv[]) {

    printf("Enter Selection Please: "); <-- WAIT HERE FOR INPUT...
    char x = getchar();

    if(x = "m") {
    do stuff;;
  2. Thread: Wait for input..

    by guda
    Replies
    3
    Views
    2,489

    Wait for input..

    how do I wait for input for a text character or string?

    ie:

    main (int argc, char *argv[]) {


    while ( argv[0] != NULL) {
    printf("Enter Selection Please: "); // I want it to wait here for...
  3. Replies
    9
    Views
    1,119

    got it... thanks guys.

    got it... thanks guys.
  4. Replies
    9
    Views
    1,119

    OK, this isnt a project, just a sample test that...

    OK, this isnt a project, just a sample test that we are suppose to work through, however the "real test" will closely resemble it.. ie, reading in, processing double matrix..


    The first Number...
  5. Replies
    9
    Views
    1,119

    doesnt cin.get() only work with char data types?...

    doesnt cin.get() only work with char data types?

    I am working with integers... reading integers...
  6. Replies
    9
    Views
    1,119

    Another Array/Readin Question

    Im usng cin, and trying to recogninze a newline character like this:



    while( !cin.eof() ) {
    cin >> row >> col;
    if(col=='\n') {
    occupied = row;
    display_array(m1);
    ...
  7. Thread: array errors

    by guda
    Replies
    3
    Views
    1,368

    const int SIZE did it.. thank you gentlemen...

    const int SIZE did it..

    thank you gentlemen :-P.
  8. Thread: array errors

    by guda
    Replies
    3
    Views
    1,368

    array errors

    Basically this program just reads in a seating chart... Problem is I keep getting the error below... Im not sure what it means... My code seems correct?.. any help?

    getting error


    ...
  9. Thread: Virtual Functions

    by guda
    Replies
    3
    Views
    2,786

    haha... your a lifesaver... or in my case I...

    haha... your a lifesaver... or in my case I should say you just saved me from becoming bald 10 yrs early :-).
  10. Thread: Virtual Functions

    by guda
    Replies
    3
    Views
    2,786

    Virtual Functions

    IM getting an error, and have no idea what the cause is.. Im creating a virtual class function and its driving me nuts..

    I get the following:


    square.cxx:6: error: virtual outside class...
  11. Replies
    5
    Views
    1,352

    string comparision, sorting

    I am trying to sort an array of strings... eg..

    george
    sam
    ralph
    lisa
    arnold

    Im trying to sort this array like:
  12. Replies
    2
    Views
    2,473

    Yes, that does work... I tried that before,...

    Yes, that does work... I tried that before, however it kept segfaulting.. I see now that the segfault occurs in display() and not in main();

    Here is display, in case anyone sees an error, tiing...
  13. Replies
    2
    Views
    2,473

    class object manipulation

    HI, little help requested.

    i am trying to select the members of a class object b1[i], by comparing
    a member->value with and external value, and if the comparision is
    true, then I would assign...
  14. Replies
    13
    Views
    1,234

    this fixed it :-). thanks. void...

    this fixed it :-).

    thanks.



    void book::setValues(string title, string author, string publisher,
    string month, string year, float...
  15. Replies
    13
    Views
    1,234

    doesnt/isnt: b1[size] = new book(title,...

    doesnt/isnt:

    b1[size] = new book(title, author, publisher, month, year, price);

    suppose to assign the data in the parameters, to the values in the class?
  16. Replies
    13
    Views
    1,234

    this is it for constructor: book.cxx ...

    this is it for constructor:

    book.cxx


    #include "book.h"
    #include <iostream>
    #include <string>

    using namespace std;
  17. Replies
    13
    Views
    1,234

    .h file #include #include...

    .h file



    #include <string>
    #include <fstream>

    using namespace std;

    class book {
  18. Replies
    13
    Views
    1,234

    new operator in for() loop

    hi.. Im trying to assign varibles to a class[array] using the new operator in a for() loop however I am having problems.. When i cout the data, it is all blank, so the variables are never actually...
  19. Replies
    4
    Views
    1,984

    Unfortunately I cant declare it as protected...

    Unfortunately I cant declare it as protected (project guidelines) so declaring the calss as a friend will work, and does work for that matter, now I just have to get it to print out the correct data...
  20. Replies
    4
    Views
    1,984

    ok, well I have decided to do this in my...

    ok, well I have decided to do this in my insurance.h file:




    class insurance: public date {
    private:
    date birthDate;
    public:
    int getDay() {return birthDate.day;}
  21. Replies
    4
    Views
    1,984

    Inheritance, istream, class datamember

    Hi.. I am having a slight problem with one of my projects and was wondering if anyone could help. I do not understand why this is not working like it should.

    Here is my class(this is a base class...
  22. Thread: cin, inheeritance

    by guda
    Replies
    4
    Views
    1,088

    I get various errors... , and yes I am...

    I get various errors... , and yes I am successfully opening the file..

    it starts out with something like this:



    g++ -g -Wall -c car.cxx
    car.cxx: In function `std::istream...
  23. Thread: cin, inheeritance

    by guda
    Replies
    4
    Views
    1,088

    cin, inheeritance

    HI,

    Im trying to get this to work, however i cannot and it is driving me crazy, what I have is a text file from which i am trying to read in the data into members of a base class, and two derived...
  24. Thread: istream + class

    by guda
    Replies
    11
    Views
    1,200

    thanx for the help !!.

    thanx for the help !!.
  25. Thread: istream + class

    by guda
    Replies
    11
    Views
    1,200

    ah ha.. actually the syntactial errors were...

    ah ha..

    actually the syntactial errors were from just typing in default values and not the *actual code...

    In my real program. letter is declared as char...

    sorry about that..

    But the...
Results 1 to 25 of 49
Page 1 of 2 1 2