Search:

Type: Posts; User: cannsyl

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    1,317

    No its a different forum so I thought it would...

    No its a different forum so I thought it would help me more to get more input. I thought if I didn't get a reply here I might there. I got this program on Thursday and it is due on Monday and I...
  2. Replies
    15
    Views
    1,317

    I honestly don't think so.

    I honestly don't think so.
  3. Replies
    15
    Views
    1,317

    I don't know...I was following the template I was...

    I don't know...I was following the template I was given...Like I said this was a c++ class and this is the only C I have ever done. I have no idea why we were thrown this curve at the end of the...
  4. Replies
    15
    Views
    1,317

    So if I have int main() { char c; int...

    So if I have

    int main()
    {
    char c;
    int k;
    FILE *fp;


    fp=fopen("input.txt", "r");
  5. Replies
    15
    Views
    1,317

    how do you read in a txt file into a c program?...

    how do you read in a txt file into a c program?
    I have

    int main()
    {
    char c;
    int k;


    //initialize
  6. Replies
    15
    Views
    1,317

    Sorry I am just in a crunch and have been...

    Sorry
    I am just in a crunch and have been working on this for a while...with little instruction in class.
    Here is my question now...Can you read in a .txt file in C the way you do in C++?
    and I...
  7. Replies
    15
    Views
    1,317

    First I would like to thank tabstop for the very...

    First I would like to thank tabstop for the very helpful reply. We haven't gone over this in class yet and you were able to clear it right up. I never would have thought to
    If someone else...
  8. Replies
    15
    Views
    1,317

    Ok so too much code. Simple question which of...

    Ok so too much code.
    Simple question
    which of my headers is deprecated or antiquated?

    #include <iostream>
    #include <fstream>
    #include <cstdlib> // for exit(..)


    #include <cstdio>
  9. Replies
    15
    Views
    1,317

    paretheses checking using stacks

    edited
  10. Replies
    11
    Views
    4,643

    I am in a c++ class (actually my first real c++...

    I am in a c++ class (actually my first real c++ class) but we are at the end of the semester and they are introducing data structures and I think this program is mostly in c but compiling with dev? ...
  11. Replies
    11
    Views
    4,643

    I know its alot, but could you comment out this...

    I know its alot, but could you comment out this code so I know what it means?

    char stk_top(void) {
    if (ptr > 0) {
    error = 0;
    return data[ptr-1];
    } else {
    error...
  12. Replies
    11
    Views
    4,643

    yes she wrote the .h file and gave it to us this...

    yes she wrote the .h file and gave it to us this is it

    /* stack.h: Declarations for a stack of chars */
    #define STK_ERROR '?'

    void stk_init();
    void stk_push(char);
    char stk_pop(void);...
  13. Replies
    11
    Views
    4,643

    our instructor gave us a .h file what does...

    our instructor gave us a .h file
    what does #define STK_ERROR '?' mean?
  14. Replies
    11
    Views
    4,643

    if std::stack is like and uses the...

    if std::stack is like <list> and uses the compiler to do something for me...my professor won't let us do that. She wants us to do things the long way first. But thanks for the other tips I kept...
  15. Replies
    11
    Views
    4,643

    Parentheses checker with stacks

    I have to use stacks to check an input file for parentheses matches.
    I have a skeleton...but I am having some problems
    Do I have to use a class or struct to do this?
    Here is what I have in main
    ...
  16. Replies
    1
    Views
    845

    Sorting a Linked List

    Ok I am trying to sort a linked list and I have declared

    private:
    struct SongNode
    {
    Song s; //value in this node
    SongNode *next; ...
  17. Replies
    54
    Views
    3,870

    ok I am getting an error that says linker...

    ok I am getting an error that says

    linker error undefined reference to 'Song::artist'
    but I am not sure where in the code it is...

    //song.h
    #ifndef SONG_H
    #define SONG_H
    #include...
  18. Replies
    54
    Views
    3,870

    ok I am getting an error that says in function...

    ok I am getting an error that says
    in function 'std::ostream& operator<<(std::ostream&, const Song&):
    invalid use of non-static data member 'Song::title'
    it is in line 15 of this code

    //song.h...
  19. Replies
    54
    Views
    3,870

    I tried adding the std::ostream, but that didn't...

    I tried adding the std::ostream, but that didn't seem to be it.
    I don't know where you mean for me to put the <iostream> I do have it in my .h's
  20. Replies
    54
    Views
    3,870

    my function definition is ostream & operator...

    my function definition is

    ostream & operator << ( ostream & os, BobCatPod & i)
    {
    os << i.getTotalMemory();
    os << i.getRemainingMemory();
    return os;
    }
    in bobcatpod.h...
  21. Replies
    54
    Views
    3,870

    the linker error i am getting is undefined...

    the linker error i am getting is
    undefined reference to 'operator<<(std::ostream&, Song const&)'
  22. Replies
    54
    Views
    3,870

    You guys have been great. I now have everything...

    You guys have been great. I now have everything compiling, but I can't get it to run. I keep getting a linker error? I don't know why it doesn't link I have all my files included I think. What...
  23. Replies
    54
    Views
    3,870

    Ok I think I only have one more problem. In my...

    Ok I think I only have one more problem.

    In my .h I have
    friend ostream & operator<<(ostream & os, const Song & s);

    and in my cpp

    ostream & operator << ( ostream & os, Song & s)
    {
    ...
  24. Thread: How long...

    by cannsyl
    Replies
    6
    Views
    999

    How long...

    how long did it take you to learn c++ and to catch on to things?
    I am in my second class and I am frustrated that I don't think I am catching on like some of my class mates. I have only been...
  25. Replies
    3
    Views
    1,307

    Ok here is everything. why won't it work? I am...

    Ok here is everything. why won't it work? I am getting so frustrated with this I feel like I have a puzzle with all the edge pieces missing.


    //song.h
    #ifndef SONG_H
    #define SONG_H
    #include...
Results 1 to 25 of 48
Page 1 of 2 1 2