Search:

Type: Posts; User: blernblan

Search: Search took 0.01 seconds.

  1. Trying to learn more about stack/heap/global data

    Hey guys, I'm trying to learn more about exactly what C stores on the stack, what it stores on the heap and what is considered global data etc. So any help is greatly appreciated. For example:

    ...
  2. Thank you Salem. So the sum size of all the...

    Thank you Salem. So the sum size of all the variables.... this means all 4 ints, and then all of the temporaries correct? Can you just tell me if temporaries usually take up a small or large amount...
  3. Ok yes, I understand it's different for every...

    Ok yes, I understand it's different for every compiler. But can we assume that certain things fall within certain ranges of bits or bytes taken up in the stack space? I mean, if ints take up 4...
  4. Well I'm assuming all local variables and...

    Well I'm assuming all local variables and temporary results will be given their own location on the stack and all locals and temporaries will have their space allocated at the beginning of the...
  5. Measuring amount of bytes of stack space needed for code?

    Hey guys, I'm trying to count the amount of bytes of stack space that the following chunk of code will need. All local variables and temp results have their own location on the stack and their space...
  6. Replies
    1
    Views
    1,658

    Printing a special type?

    Hey guys, I'm trying simply to print the property called "NodeKind" within my syntax tree. It's declared as such:



    typedef enum {VarK,IdK,OpK,ConstK,ComK} NodeKind;


    Every node in my tree...
  7. Printing Syntax Tree with different indentation at different levels?

    Hey guys, I'm trying to print out my syntax tree using different amounts of indentation for each level in the tree. I'm not not quite sure how to achieve this in C. I've created a for loop and a...
  8. Replies
    4
    Views
    19,624

    Alright I got the thing to compile by changing...

    Alright I got the thing to compile by changing the print function as follows:



    void printEntries()
    {
    for(i = 0; i < tol; i++)
    {
    printf("%d", symbolTable[i]->line, ":");...
  9. Replies
    4
    Views
    19,624

    I posted the code in segments to make it easier...

    I posted the code in segments to make it easier to follow, but here's the entire file:



    %option noyywrap

    %{

    #include <stdlib.h>
    #include <stdio.h>
  10. Replies
    4
    Views
    19,624

    Printing an array of structs?

    Hey guys, so what I'm trying to do is print each member of a struct from every struct in an array. When I try to use the following code, I get an error saying "error request for member 'line' in...
Results 1 to 10 of 10