Search:

Type: Posts; User: loso44x

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    1,991

    Question about dup2

    I am wondering how to make dup2 to stop writing to a file even after i closed the file when i use close(fd). For instance the last line is still writing to the file, but i want it to write to the...
  2. Replies
    4
    Views
    768

    hmm its not working it keeps subtracting from the...

    hmm its not working it keeps subtracting from the initial value heres my class..



    class ProductManager: public sales
    {
    public:
    string productName1;
    float price;
    int...
  3. Replies
    4
    Views
    768

    need help with classes

    im trying to make a variable in a class which changes and doesnt start over from the initial value ... for example if i have int quantity = 500 and subtract 100 the new value will be 400 then i...
  4. Replies
    13
    Views
    852

    it works i discarded the header file and just...

    it works i discarded the header file and just includded functions.cpp in main.cpp ... thanks
  5. Replies
    13
    Views
    852

    1234

    1234
  6. Replies
    13
    Views
    852

    the menu function is in my other c++ file - i put...

    the menu function is in my other c++ file - i put menu() in main now its giving me errors that my other functions are undeclared since menu calls other functions
  7. Replies
    13
    Views
    852

    i revised my header file but now it says menu is...

    i revised my header file but now it says menu is undefined..

    #define SIZE 50
    #include <sstream>
    #include <fstream>
    #include <iostream>
    #include <string>
    using namespace std;
    class store //...
  8. Replies
    13
    Views
    852

    still gives me same error

    still gives me same error
  9. Replies
    13
    Views
    852

    any1 plz!! my program is due tomorrow

    any1 plz!! my program is due tomorrow
  10. Replies
    13
    Views
    852

    need help creating two source files..

    ok say heres my code in once source file..



    #include <sstream>
    #include <fstream>
    #include <iostream>
    #include <string>
    #include "stdlib.h"
    #define SIZE 50 // size of the array
  11. Replies
    13
    Views
    1,023

    okay the input looks like this ...

    okay the input looks like this

    STORE1[0].custnum = 10212
    STORE1[1].custnum = 11234
    STORE1[2].custnum = 10212
    STORE1[3].custnum = 10212
    STORE1[4].custnum = 13114
  12. Replies
    13
    Views
    1,023

    any1 know whats wrong?

    any1 know whats wrong?
  13. Replies
    13
    Views
    1,023

    i wrote it but something is working incorrectly...

    i wrote it but something is working incorrectly it stores again at diff locations

    here is the code


    y is size of STORE1

    tmp[0][0].custnum = STORE1[0].custnum;

    for(int j=1;j<y;j++) {
  14. Replies
    13
    Views
    1,023

    tmp[0][0].id = 2 tmp[0][1].id = 2 ...

    tmp[0][0].id = 2
    tmp[0][1].id = 2

    tmp[1][0].id = 5

    tmp[2][0].id = 3

    is there an easier way to do this?
  15. Replies
    13
    Views
    1,023

    id is an int variable of a class - a[0].id thru...

    id is an int variable of a class - a[0].id thru a[n].id is alrdy filled with product ids and tmp[0][0].id is initialized to a[0]...what i want to do is check to see if each product id is equal in the...
  16. Replies
    13
    Views
    1,023

    [x][x] is two dimension sry i revised my thread...

    [x][x] is two dimension
    sry i revised my thread is it understandable?
  17. Replies
    13
    Views
    1,023

    !urgent need help with writiing loop

    say i have an array of size 4

    and this is what i want to to...
    tmp[0][0].id is initialized to [0].id

    if tmp[0][0].id = a[1].id
    tmp[0][1].id = a[1].id
    if it isnt true go to next statement...
  18. i think that just fills the array to what u want...

    i think that just fills the array to what u want it to be
  19. need help with for looping two-dimensional array

    Hi im trying to write a function which takes the value of an array from a class with custnum variable and compares it with the other values of the array


    lets say if i have 4 custnum ids...and...
  20. Replies
    2
    Views
    1,135

    problem with inventory program

    this program uses fstream

    data file
    format:
    productid productname quantity purchasedate

    10212 Nescafe 20 10/12/05
    13114 Pepsi 11 10/27/05
    11234 Nescafe 14 11/01/05
    10212 Nescafe 30...
  21. Replies
    3
    Views
    921

    i modified it to this for(int...

    i modified it to this


    for(int x=0;x<line;x++)
    {
    in_file >> STORE1[x].custnum;
    in_file >> STORE1[x].product;
    in_file >> STORE1[x].quantity;
    ...
  22. Replies
    3
    Views
    921

    delete invalid data from an array

    Hi i have a program that reads data from a file.. if the quantity or date is wrong it would ignore that entry completely for further comparison how would i go about putting only valid types into the...
  23. Replies
    4
    Views
    844

    the problem is that the function nextprev runs...

    the problem is that the function nextprev runs twice instead of once not the scanf problem. so when the program runs u see the print statements twice and it wants two inputs.
  24. Replies
    4
    Views
    844

    i took out the default: in the switch statement...

    i took out the default: in the switch statement because the function in the program ran twice so if u were to put n, the program takes in n and a space and becuase u entered a space, u also enter the...
  25. Replies
    4
    Views
    844

    problem with program

    can anybody help me with this problem, the function nextprev() runs twice for some reason and becuase of this there's no way to break out of the look. can someone tell me why it runs twice or how to...
Results 1 to 25 of 44
Page 1 of 2 1 2