Search:

Type: Posts; User: Lateralus

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    32
    Views
    6,899

    For what kind of degree? Only Java? At my...

    For what kind of degree? Only Java?

    At my university, Java is taught first, then C++; from there its the students job to learn other languages (besides obvious cases).

    The point is: a...
  2. Replies
    3
    Views
    2,626

    Maybe he is incrementing curtab before he should,...

    Maybe he is incrementing curtab before he should, because it is accessing the array of structs starting at index 1.
  3. Replies
    5
    Views
    1,302

    Or if you didn't want to use dynamic memory...

    Or if you didn't want to use dynamic memory allocation:



    int main(void) {
    int data = 0;
    struct node d;
    d.count = data++; //assigns data to d.count, then increments data by 1
    ...
  4. Replies
    2
    Views
    1,085

    Yes, you don't need to look for programming...

    Yes, you don't need to look for programming references. This is a math topic more so than a programming one. A programming language is a tool used to implement mathematical concepts.
  5. Replies
    1
    Views
    1,222

    missing template parameters? help!

    I am working on a project for a C++ class. We need to implement an abstract problem solver that can solve simple, yet different problems.

    I am doing this by creating a 'rule' class for each...
  6. Replies
    8
    Views
    4,167

    A simple one would be strcmp(). if...

    A simple one would be strcmp().



    if (strcmp(str1, str2) == 0) {
    // password is correct
    }


    Read the man page for strcmp for full details, but it will return 0 if the strings are the same.
  7. Replies
    11
    Views
    2,030

    The following shows a basic way I have used it....

    The following shows a basic way I have used it. Any code within the if block is the child process. It is good to take in multiple connections in a client/server app.



    pid_t child;

    .......
    ...
  8. Replies
    5
    Views
    1,439

    I don't know if this is gonna help but recently...

    I don't know if this is gonna help but recently (in unix) I used read() on a file descriptor. Then if it returned an error, and errno was EISDIR (or something like that, then I knew it was a...
  9. Replies
    6
    Views
    1,190

    I would try posting in a linux forum if that was...

    I would try posting in a linux forum if that was the result. Cause your dealing with system calls here.

    I would also check if the file descriptor is valid.

    EDIT........

    Actually try using...
  10. Replies
    6
    Views
    1,190

    Im not sure how it would work with a serial port,...

    Im not sure how it would work with a serial port, but most likely, its a file descriptor. With that you can call stat (see man stat page) and then get a struct, which contains the size of the data...
  11. Replies
    5
    Views
    1,266

    Great question. I was just thinking about this...

    Great question. I was just thinking about this myself the other day.
  12. Thanks for the heads up. I'll look into...

    Thanks for the heads up. I'll look into everything you mentioned.
  13. suggestions for my file backup app (for linux)

    I just got to working code with my first program dealing with the unix file system. all it does is accept a command line path to a directory, and a path to the directory where the files will be...
  14. What school is this from? Pretty nice. I go to...

    What school is this from? Pretty nice. I go to RIT (rochester institute of technology) and we just got a new gym/training facility. It's a really big one like your picture. It's nice when you see all...
  15. Replies
    5
    Views
    1,485

    Yea, what Linux distro are you using? Most...

    Yea, what Linux distro are you using? Most popular ones include gcc/g++. Simply type g++ into a terminal to see if its installed.
  16. Replies
    4
    Views
    1,578

    I got everything straight now. I am one of about...

    I got everything straight now. I am one of about six interns at this company, and we all sit in cubicles. The whole time I was trying to fix the problem this other intern kept talking, and talking,...
  17. Replies
    4
    Views
    1,578

    That did seem like the obvious way to do it, but...

    That did seem like the obvious way to do it, but I wanted to have the string copied to the memory I allocated, instead of pointing it to argv[1]. It just seemed like it would have worked better that...
  18. Replies
    4
    Views
    1,578

    printing a string to a struct member???

    Well, basically what I need to do is take a command line argument and store its value in a char * located in a struct.



    int main(int argc, char *argv[])
    {
    // some other stuff
    struct...
  19. Replies
    1
    Views
    1,568

    R/W on files in a directory by i-number

    I am working with some Unix system calls, and I want to be able to open a directory, and perform read/write operations on the files in that directory.

    I already know that I can open a directory,...
  20. Replies
    12
    Views
    6,557

    ahahaha, pocket protector +5.... Anyway if...

    ahahaha, pocket protector +5....

    Anyway if your looking to do sockets maybe you should look at Stevens UNIX Network Programming. It'll get you to where you wanna go with sockets.
  21. Replies
    20
    Views
    15,100

    ahahaha, and I just read through the whole thread...

    ahahaha, and I just read through the whole thread until I read Salem's post and looked at the dates.
  22. Replies
    3
    Views
    1,560

    Now I want to upgrade it so that it can use...

    Now I want to upgrade it so that it can use different data types. I know I will have to cast values and use void pointers, but I am unsure how to go about this. Can someone point me to a detailed...
  23. Replies
    4
    Views
    1,965

    Yea, the nice thing about running into problems...

    Yea, the nice thing about running into problems like this is that it is very unlikely that I won't consider precedence in the future. :D
  24. Replies
    4
    Views
    1,965

    Well, after taking a look around I solved the...

    Well, after taking a look around I solved the problem.

    In order to use tree->root I needed to use: (*tree)->root;

    Mods, you can delete this if you wish, or other can view it for reference.
  25. Replies
    4
    Views
    1,965

    pointer to pointer as argument question

    If I have a function, such as a delete function for a binary search tree, and I want to change the root node, which is a pointer within main(), The only way I read I could do that would be to pass a...
Results 1 to 25 of 45
Page 1 of 2 1 2