Search Result

Collapse
6 results in 0.0015 seconds.
Keywords
Members
Tags
stack
  •  

  • rusty uts
    started a topic General protection fault/stack fault
    in C

    General protection fault/stack fault

    Well I had an assignment to sort an array of structures so i went about trying but always some strange fault come about. Now not only does the main program fail but also another program. What i want to know is that is it a problem in my code, or something else is happening?? Below are the two programs!!

    Code:
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    main()
    {
    	struct boy
    	{
    ...
    See more | Go to post
    Last edited by Meetee; Jun 20 '11, 04:40 AM. Reason: Please add code tags while posting a code i.e. [CODE][/CODE]

  • puneetsardana88
    started a topic Array using stack
    in C

    Array using stack

    Consider a language that does not have arrays but does have
    stacks as a data type.and PUSH POP..are all defined .Show
    how a one dimensional array can be implemented by using two
    stacks.

    I am unable to solve this. Can somebody tell me whats the approach one should follow? I dnt need the code, only approch will suffice.
    See more | Go to post

  • how does an optimizing c++ compiler reuse stack slots of a function?

    How does an optimizing c++ compiler determine when a stack slot of a function(part of stack frame of a function) is no longer needed by that function, so it can reuse its memory? .
    By stack slot I mean a part of stack frame of a function, not necessarily a whole stack frame of a function and an example to clarify the matter is, suppose we have a function that has six integer variables defined in its scope, when it's time to use sixth variable...
    See more | Go to post

  • seper254
    started a topic Heap Stack Diagram from Code
    in Java

    Heap Stack Diagram from Code

    Hey I am in the middle of Java and I am having trouble drawing heap stack diagrams from code. I have two that I really need help with.

    First code:

    public class HEAPSTACK extends ConsoleProgram{
    public void run(){
    Integer n1=1;
    Integer n2=20;
    int computation=met h(n1,n2);
    println("comput ation:"+computa tion);

    Draw the heap-stack diagram when println has been called...
    See more | Go to post

  • praetor
    started a topic Automatic variables + stack
    in C

    Automatic variables + stack

    Hi,

    I have gone through a few posts on this topic in the forum and seem to get more confused.

    I write a simple function in C which has local/automatic variables say a,b,c

    Now from what i could gather from the forum posts is that the sections (data,code,stac k,heap etc) are not a part of the C standard.

    So, suppose i decide to place my function in the bss segment.

    Now during...
    See more | Go to post

  • presencia
    started a topic heap object question, and RAII advice request
    in C

    heap object question, and RAII advice request

    Hi all,
    I am still in the process of lerning how to write decent C++ code. I will appreciate any good advice or corrections. I have two questions, a technical one and one for advice for how to design my code.

    1. I have read somewhere (can't remember, must have been some tutorial page) that objects allocated on the heap can only be accessed through pointers. Thus, for example
    Code:
    vector<int> * v_ptr = new vector<
    ...
    See more | Go to post
Working...