Search:

Type: Posts; User: hotshotennis

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,209

    Program Producing Infinite Garbage

    // Lab0Inventory.cpp : Starter lab
    //Anastasia Glyantseva


    #include "stdafx.h"
    #include <fstream>
    #include <iostream>
    #include <iomanip>
    #include <sstream>
    //#include "MemTracker.h"
  2. Thank you for your input! It is a C->C++...

    Thank you for your input! It is a C->C++ conversion. However, we are to leave the allocations, printf's, etc alone for now. (That will be the next assignment). The structures shouldn't be turned into...
  3. Accessing Private Variables in Structures

    Hello,
    this is my first C++ assignment so please bear with me. I need to translate a C program to C by making variables in structures private(no classes yet!) and putting public inline functions....
  4. Replies
    10
    Views
    2,451

    The header file just has all of the basic stack...

    The header file just has all of the basic stack operations such as: create stack, push/pop stack, delete stack, stack count, etc.
  5. Replies
    10
    Views
    2,451

    Yep! That's the one. I figured out how to get the...

    Yep! That's the one. I figured out how to get the input file to work and the header file. But now I need further help figuring out the algorithm.
  6. Replies
    10
    Views
    2,451

    I need to read through the file line by line and...

    I need to read through the file line by line and whenever I encounter an 'S' it means that a stock is being sold so I process the 'B'(buys) above it and calculate how many were sold multiplied by the...
  7. Replies
    10
    Views
    2,451

    Reading file into stack

    This is my input file:
    02/15/1995 S 10000 3.71
    02/15/1995 B 10000 3.71
    02/15/2009 B 1000 16.15
    01/27/2011 S 5000 28.87
    09/02/2011 B 100 25.80
    09/06/2011 B 500 25.51
    09/08/2011 S ...
  8. Replies
    4
    Views
    1,612

    That was just a typo. I do have the header...

    That was just a typo. I do have the header written as #include "stackADT.h". It still doesn't recognize it. But I need that header to write the program.
  9. Replies
    4
    Views
    1,612

    Algorithm Help Please!

    Hello,
    I'm having trouble understanding what one of my assignments requires me to do. This is a data structures ADT program. I tried emailing the teacher, but she could only manage to clarify a few...
  10. Replies
    10
    Views
    6,362

    Yes! Thank you! That's what I did and it worked!

    Yes! Thank you! That's what I did and it worked!
  11. Replies
    10
    Views
    6,362

    I tried specifying the path with...

    I tried specifying the path with C:\\User\Anastasia\Documents... And a bunch of other methods. Basically using the path that I see when I open that notepad document. I tried adding .txt at the end...
  12. Replies
    10
    Views
    6,362

    I tried specifying the file path and everything....

    I tried specifying the file path and everything. Its getting really annoying. Do you know where the IDE working directory is for visual studio? Because the user input is really just me. I'm not...
  13. Replies
    10
    Views
    6,362

    Okay, so I did the printf statement before...

    Okay, so I did the printf statement before opening the file and it prints out the file name just fine. When I use the strerror it says "No such file or directory". Any other suggestions?
  14. Replies
    10
    Views
    6,362

    I've tried specifying the directory path and...

    I've tried specifying the directory path and everything without any luck... Anyone have any ideas? Oh and I removed the & in front of filename for the scanf. I realized that that was an error.
  15. Replies
    10
    Views
    6,362

    User input file

    Hey guys, so I have a bit of a silly problem. I'm starting to write a program in MS visual studio that requires me to open a user specified file. I've created the file in notepad, but when I run the...
  16. How to correctly free all memory please help!

    #include <stdio.h>
    #include <stdlib.h>
    #include <stdbool.h>

    #define FLUSH while (getchar() != '\n')

    // Global Declarations
    typedef int KEY_TYPE;
    typedef struct
    {
  17. Replies
    6
    Views
    1,120

    Ok, I got rid of locn in binary search. For some...

    Ok, I got rid of locn in binary search. For some reason I thought I needed it to be able to exit my while loop, but I guess not. I got rid of the duplicate lines as well. What do you mean by fix my...
  18. Replies
    6
    Views
    1,120

    The input files state the number of lines of the...

    The input files state the number of lines of the file on the very first line.
  19. Replies
    6
    Views
    1,120

    -No, I am doing this in Unix and compiling with...

    -No, I am doing this in Unix and compiling with gcc. Thats why its commented out. I'm supposed to use Valgrind, but I'm not quit sure how to interpret what it tells me.
    -That code was actually...
  20. Replies
    6
    Views
    1,120

    Data Structures Program

    ** Pointers, Structures, Arrays, Strings, and Dynamic Allocation of Memory
    **
    **********************************************************************************

    This program provides...
  21. Replies
    7
    Views
    1,135

    #include #include #define...

    #include <stdio.h>
    #include <string.h>
    #define MAX_TITLE 100

    typedef struct
    {
    int month;
    int day;
    int year;
    }DATE;
  22. Replies
    7
    Views
    1,135

    I already posted the compiler errors... A bunch...

    I already posted the compiler errors... A bunch of them are warnings about the extra braces for BOOK list and the other one is an error that HEADER has no member named pAry. As for the code, beside...
  23. Replies
    7
    Views
    1,135

    The *BOOK was a typo. I meant for it to be &BOOK....

    The *BOOK was a typo. I meant for it to be &BOOK. But this still doesn't not remedy the problem. From what I understand, DATE is supposed to be a structure definition... Honestly, the part with all...
  24. Replies
    7
    Views
    1,135

    Structures in C Help Please!

    /* Complex Structures 6 Points

    Define pHead, a pointer to a structure called HEADER.
    This structure contains two fields: a counter (type int)
    and a pointer to an array of structures,...
  25. Ok thank you!

    Ok thank you!
Results 1 to 25 of 166
Page 1 of 7 1 2 3 4