stack overflow problem


 Hi,

  I have traced my problem to the following line of code which seems
to be causing a stack overflow problem: (see below)

I'm declaring a multidimenstional array   of  CGridbox Objcts

A CGridbox consists of 2 arrays of CApect Objects..

The code works fine when line is commented out. and breaks when put
back in...

It appears that the object has problems upon creation....

the header file for the delcaration looks like:

==Any ideas what I'm doing wrong???

Thanks very much in advance....

Tony C. 

================================================
//CLASS ASPECTGRID = A DIALOG = "ASPECTGRID.H"
#pragma once
#include "CalcedChart.h"
#include "GridBox.h"
#include "Aspects.h"


// cAspectGrid dialog




class cAspectGrid : public CDialog
{
	DECLARE_DYNAMIC(cAspectGrid)
	

public:
	cAspectGrid(CWnd* pParent = NULL);   // standard constructor
	virtual ~cAspectGrid();

	//***********************************************************
	CGridBox AspGrid[17][17]; //<<<==============PROBLEM LINE **
	//***********************************************************

==================================================
//CLASS GRIDBOX
#pragma once
#include "Aspect.h"

// CGridBox

class CGridBox 
{
	

public:
	CGridBox();
	virtual ~CGridBox();
	//Public colDeclAsp As New CAspectCollection
	CAspect arrRegAsp[4];
	CAspect arrDecAsp[4];

protected:
	
};
==================================================
//CLASS ASPECT
#pragma once


// CAspect

class CAspect 
{


public:
	CAspect();
	virtual ~CAspect();
	CPlanet P1 , P2 ;
	double dbDegr1, dbDiff;
	CString strAspect1;
	CStringW chGlyph1;
	COleDateTime dtExact, dtCalc, dtStart, dtEnd;
	int intSubType; // 1 = raw2raw 2 = ra2ra 3 = raw2ra 4= ra2raw
	int intAspNo; // conj thru opp + parallel and contraparallel
	CAspect& CAspect::operator=(const CAspect &A);	

		
		  
		

protected:
	
};


==================================================
0
Tony
4/24/2010 7:33:14 PM
vc.mfc 33608 articles. 0 followers. Follow

10 Replies
1134 Views

Similar Articles

[PageSpeed] 33

Ok

 I changed the 2 inner arrays inside the CGridbox object.

Instead of being arrays of CAspect, I changed them to 

arrays of type int...and I get no stack overflow errors and

the dialog comes up just fine...



==> So when I have an array of objects inside another type
of object, do I need to somehow dynamically allocate memory
for the array of inner obects? 

   Some special kind of constructor for the inner ojects of type
CAspect in my case?


thanks.


0
Tony
4/24/2010 8:05:14 PM
Hello,

Tony C. wrote:
> Ok
> 
>  I changed the 2 inner arrays inside the CGridbox object.
> 
> Instead of being arrays of CAspect, I changed them to 
> 
> arrays of type int...and I get no stack overflow errors and
> 
> the dialog comes up just fine...
> 
> 
> 
> ==> So when I have an array of objects inside another type
> of object, do I need to somehow dynamically allocate memory
> for the array of inner obects? 

No.

>    Some special kind of constructor for the inner ojects of type
> CAspect in my case?

Normally not. Could you post at least the Constructor of CAspect and
maybe CGridBox.

Best regards,

Oliver
0
Oliver
4/24/2010 8:36:59 PM
You can try to dynamically allocate it in the constructor and 
deallocate it in the destructor:

class cAspectGrid : public CDialog
{
   ....
public:
       CGridBox *pAspGrid;  // make this pointer
   ....
}

// CONSTRUCTOR
cAspectGrid::cAspectGrid
{
     pAspGrid = new CGridBox[17*17];
}

// DESTRUCTOR
cAspectGrid::~cAspectGrid
{
     delete pAspGrid;
}

Now, if you want to get a ROW and COLUMN view of the 17*17, use this 
"GET" function:

CGridBox * cAspectGrid::GridBox(int row, int col)
{
     // assuming base 0 for row and col
     // add maybe ROW and COL checking
     return pAspGrid[row*17+col];
}


Now you can use it like so:

    GridBox(2,5)->Whatever

-- 
HLS


Tony C. wrote:

> Ok
> 
>  I changed the 2 inner arrays inside the CGridbox object.
> 
> Instead of being arrays of CAspect, I changed them to 
> 
> arrays of type int...and I get no stack overflow errors and
> 
> the dialog comes up just fine...
> 
> 
> 
> ==> So when I have an array of objects inside another type
> of object, do I need to somehow dynamically allocate memory
> for the array of inner obects? 
> 
>    Some special kind of constructor for the inner ojects of type
> CAspect in my case?
> 
> 
> thanks.
> 
> 

0
Hector
4/24/2010 8:37:56 PM
On Sat, 24 Apr 2010 22:36:59 +0200, Oliver Regenfelder
<oliver.regenfelder@gmx.at> wrote:

>Hello,
>
>Tony C. wrote:
>> Ok
>> 
>>  I changed the 2 inner arrays inside the CGridbox object.
>> 
>> Instead of being arrays of CAspect, I changed them to 
>> 
>> arrays of type int...and I get no stack overflow errors and
>> 
>> the dialog comes up just fine...
>> 
>> 
>> 
>> ==> So when I have an array of objects inside another type
>> of object, do I need to somehow dynamically allocate memory
>> for the array of inner obects? 
>
>No.
>
>>    Some special kind of constructor for the inner ojects of type
>> CAspect in my case?
>
>Normally not. Could you post at least the Constructor of CAspect and
>maybe CGridBox.
>
>Best regards,
>
>Oliver

======================================
///CASPECT.CPP
// Aspect.cpp : implementation file
//

#include "stdafx.h"
#include "AstroCalcVC1.h"
#include "Aspect.h"


// CAspect

//IMPLEMENT_DYNAMIC(CAspect, CWnd)

CAspect::CAspect()
{

dbDegr1 = 0;
dbDiff = 0;
intSubType = 0;
intAspNo = 0;


}

CAspect::~CAspect()
{
}


CAspect& CAspect::operator=(const CAspect &A)
{

this->P1 = A.P1;
this->P2 = A.P2;
this->dbDegr1 = A.dbDegr1;
this->dbDiff = A.dbDiff;
this->intSubType = A.intSubType;
this->intAspNo = A.intAspNo;
this->chGlyph1 = A.chGlyph1;
this->dtCalc = A.dtCalc;
this->dtEnd = A.dtEnd;
this->dtStart = A.dtStart;
this->dtExact = A.dtExact;
this->strAspect1 = A.strAspect1;

return *this;

}


//BEGIN_MESSAGE_MAP(CAspect, CWnd)
//END_MESSAGE_MAP()



// CAspect message handlers

=================================================
// GridBox.cpp : implementation file
//

#include "stdafx.h"
#include "AstroCalcVC1.h"
#include "GridBox.h"


// CGridBox



CGridBox::CGridBox()
{


}

CGridBox::~CGridBox()
{
}




// CGridBox message handlers


========================================


CGridbox.cpp and CAspect.cpp
0
Tony
4/24/2010 9:04:48 PM
On Sat, 24 Apr 2010 16:37:56 -0400, Hector Santos
<sant9442@nospam.gmail.com> wrote:

>You can try to dynamically allocate it in the constructor and 
>deallocate it in the destructor:
>
>class cAspectGrid : public CDialog
>{
>   ....
>public:
>       CGridBox *pAspGrid;  // make this pointer
>   ....
>}
>
>// CONSTRUCTOR
>cAspectGrid::cAspectGrid
>{
>     pAspGrid = new CGridBox[17*17];
>}
>
>// DESTRUCTOR
>cAspectGrid::~cAspectGrid
>{
>     delete pAspGrid;
>}
>
>Now, if you want to get a ROW and COLUMN view of the 17*17, use this 
>"GET" function:
>
>CGridBox * cAspectGrid::GridBox(int row, int col)
>{
>     // assuming base 0 for row and col
>     // add maybe ROW and COL checking
>     return pAspGrid[row*17+col];
>}
>
>
>Now you can use it like so:
>
>    GridBox(2,5)->Whatever


I'll play with that Hector,,obviously I need a 
memory allocation tutorial or something. 

Thanks
0
Tony
4/24/2010 9:24:00 PM
Firs, you need to do the arithmetic.  You have 17x17 = 289 objects.  How big is each
object?  Then, you are probably declaring this on the stack, so you need to know how big
your stack space requirement is, and how it compares to your stack.

Given the horrible number of commas in the declaration lists, I'm not even going to bother
counting bytes (never declare more than one variable in a declaration to achieve maximum
readability:
	int x, y, z;  // BAD
		
	int x;	// GOOD
	int y;
	int x;	

Then you are declaring complex objects (COleDateTime) whose size you do not know at the
moment, so you need to figure out how big they are.

If the total is > 1MB then you are guaranteed stack overflow if you declare one of these
on the stack.

There are a couple solutions for this:

1.  Don't declare big arrays of big objects on the stack
2.  If you need big arrays of big objects, put them on the heap

2 follows naturally from 1.  This is one of the few places you would ever need a 'new' and
actually if you used std::vector you would not have to do anything special, because
std::vector actually does allocate on the heap but frees everything up when you leave
scope, so you don't have to do anything special to avoid storage leaks.  By trying to
combine the old-fashioned C declaration style for an array with a C++ program, you have
failed to take advantage of the C++ language.  So there is another rule
	
0. Stop thinking that you are programming in C, and learn to program in C++

All your problems stem from a desire to program using 1975 syntax in a 1965 language. This
is 2010, and you should use 2010 syntax in a 2010 language.

The way I would fix this is to follow rule 0, and record it to use modern programming
technology.
				joe

On Sat, 24 Apr 2010 14:33:14 -0500, Tony C. <me@here.com> wrote:

>
>
> Hi,
>
>  I have traced my problem to the following line of code which seems
>to be causing a stack overflow problem: (see below)
>
>I'm declaring a multidimenstional array   of  CGridbox Objcts
>
>A CGridbox consists of 2 arrays of CApect Objects..
>
>The code works fine when line is commented out. and breaks when put
>back in...
>
>It appears that the object has problems upon creation....
>
>the header file for the delcaration looks like:
>
>==Any ideas what I'm doing wrong???
>
>Thanks very much in advance....
>
>Tony C. 
>
>================================================
>//CLASS ASPECTGRID = A DIALOG = "ASPECTGRID.H"
>#pragma once
>#include "CalcedChart.h"
>#include "GridBox.h"
>#include "Aspects.h"
>
>
>// cAspectGrid dialog
>
>
>
>
>class cAspectGrid : public CDialog
>{
>	DECLARE_DYNAMIC(cAspectGrid)
>	
>
>public:
>	cAspectGrid(CWnd* pParent = NULL);   // standard constructor
>	virtual ~cAspectGrid();
>
>	//***********************************************************
>	CGridBox AspGrid[17][17]; //<<<==============PROBLEM LINE **
>	//***********************************************************
>
>==================================================
>//CLASS GRIDBOX
>#pragma once
>#include "Aspect.h"
>
>// CGridBox
>
>class CGridBox 
>{
>	
>
>public:
>	CGridBox();
>	virtual ~CGridBox();
>	//Public colDeclAsp As New CAspectCollection
>	CAspect arrRegAsp[4];
>	CAspect arrDecAsp[4];
>
>protected:
>	
>};
>==================================================
>//CLASS ASPECT
>#pragma once
>
>
>// CAspect
>
>class CAspect 
>{
>
>
>public:
>	CAspect();
>	virtual ~CAspect();
>	CPlanet P1 , P2 ;
>	double dbDegr1, dbDiff;
>	CString strAspect1;
>	CStringW chGlyph1;
>	COleDateTime dtExact, dtCalc, dtStart, dtEnd;
>	int intSubType; // 1 = raw2raw 2 = ra2ra 3 = raw2ra 4= ra2raw
>	int intAspNo; // conj thru opp + parallel and contraparallel
>	CAspect& CAspect::operator=(const CAspect &A);	
>
>		
>		  
>		
>
>protected:
>	
>};
>
>
>==================================================
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
Joseph
4/24/2010 10:26:41 PM
Tony C. wrote:

>> CGridBox * cAspectGrid::GridBox(int row, int col)
>> {
>>     // assuming base 0 for row and col
>>     // add maybe ROW and COL checking
>>     return pAspGrid[row*17+col];
>> }


Small note: That should return the address:

      return &pAspGrid[row*17+col];

>> Now you can use it like so:
>>
>>    GridBox(2,5)->Whatever
> 
> 
> I'll play with that Hector,,obviously I need a 
> memory allocation tutorial or something. 
> 
> Thanks


Yes, it is a good idea to learn about memory management, the basics of 
how its done, and to know when you need to use it - correctly.

It will serve no justice to you to try to tell you all about it in one 
message. The internet is very rich with this information.

Google research terms like:

     C++ Dynamic Memory Methods
     initializing dynamic class instance
     Memory Pools (more advanced)

etc. There are many hits, there is this one:

http://www.cplusplus.com/doc/tutorial/dynamic/

and a good one is one by Bruce Eckel, maybe getting his book "Thinking 
in C++" will be a good idea:

http://smart2help.com/e-books/ticpp-2nd-ed-vol-one/Chapter13.html

-- 
HLS
0
Hector
4/25/2010 2:23:44 AM
Thanks  Very Much for the Info..!



Tony C.



0
Tony
4/25/2010 2:43:14 AM
In addition to the other suggestions, sometimes stack oflo is caused
by not allocating enough stack for legitimate code (as opposed to
infinite recursion). You can check this quickly by increasing the
stack for your app in Linker/System/Reserve. The default in XP32 is 1
MB, so try 10 MB and see if the symptoms go away. If so, then do the
recommended arithmetic, so you know how much memory you need.
0
Woody
4/25/2010 8:23:06 AM

  I'm getting a much needed understanding of the way C++
handles dynamic memory now.  Thanks for everybody's input. 


Tony C.
0
Tony
4/25/2010 11:51:57 PM
Reply:

Similar Artilces:

Importing problem
We recently installed an exchange server and I am importing my calendar items into the Outlook running on the exchange server from Outlook running on my PC. When I import the calendar items all the appointments are one hour off from the original. I checked the time and time zone on the exchange server and it is the same as the PC. Does anyone know how to fix this? You need to check both time zone and daylight saving time settings in both Windows and Outlook. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the ne...

Creating new contacts from account -problem
I was reading couple of posts but culdnt find any solution. whenever i create new contact from account , i get the error "The parameter is incorrect". I have checked the mapping between account and contact and i dont find anything different . anyone got this to work? regards and thanks Aami The detail error message = The parameter is incorrect. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Argument...

Problem with some installers
Hello, I am using Win 7 Ultimate x64. Since recently, I am having a problem with some installers (not all). It seems that all installers that cause problems are a) UPX packed b) based on InstallShield When starting the installer, I first get: "Insufficient free disk space" (I have over 3TB free though!) and then: "Cannot prepare main package. Probably incorrect TMP/TEMP variables or there is no execute permission for temporary folder." The variables TMP and TEMP are set correctly and execute permissions are set for the temporary folder. S...

Code problem
The below Auto_Close is suppose to restore the screen display and workbook tabs (toolbars and tabs visible again)when the user closes the window by clicking the "X" button. Auto_Close doesn't work. Can someone help me with the code? I have included the Auto_Open that turns off full screen and tabs, in case it has something to do with why Auto_Close doesn't work. Sub Auto_Open() Dim ws As Worksheet Application.ScreenUpdating = False Application.DisplayFullScreen = True For Each ws In Worksheets If ws.Visible = xlSheetVisible Then w...

Outlook 97 startup problems
Trying to startup outlook 97 I get the following message: The program is not registrated right. Install setup again. Cannot find the file. Check that the path or filename are correct. Does someone have an idea howe I can fix this problem? ...

xs:dateTime and timezone problems
Not sure if this is an xml or a ado.net question: I have created an xml document from a .net dataset which contains a DateTime column, however all the time elements are set to 00:00:00. example of xml created: <Date>2005-06-03T00:00:00.0000000+01:00</Date> I am based in the UK and my computer timezone is set to GMT (although the above data may have been created during DST). If I load this xml document back into a dataset and save the results into a sql table, I find that the time element remains zero (regardless of it being DST or not). If I change my computer timezone to Sydne...

Problem with Outlook Tasks
Hello there, Over the last two weeks I've been having a problem with entering in Tasks in Outlook 2003 SP2. When I try to save a task, I receive the generic error - Please save the task order by clicking save task order on the actions menu in the "tasks" folder. The view must not be filtered or grouped for save taks order to be available. Could not complete the operation. One or more parameter values are not valid. The steps I've taken to resolve this have been Save Task order fails Uninstalling Office 2003 SP1 with a reg clean Exporting all tasks to a PST leaving a c...

Stacked bars with textlegends in each stacked bar
Hi Group I wonder if this can be done. Data like this A | 0 | 3 B | 3 | 0 C | 2 | 3 1' column is legend 2' column is values to Y axis (this shoul have "1" (first stacked bar) on the X axis) 3' column is values to Y axis (this shoul have "2" (second stacked bar) on the X axis) Here I would like to have 2 stacked bars Each have legend inside bar IF value is more than 0 That would say in this case ___ ___ | | | | A | | B |___| |___| | | | C | | C | | 1 2 Hobe I explained so that you guys undetstand :-) cheers ...

Layout problem with Column/row headers
We have a user who's default Excel layout has been switched to a "mirror view" of the norm... The column headers go right to left A,B,C rather than left to right. Also the rows 1,2,3 are on the right side of the screen and sheet tabs are 3,2,1... Basically everything is backwards! We can't figure out how she did that! Thanks for any help! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Tools, Options, International Tab, de-select the option under ...

Stacked column with line chart
I have a chart which shows units gained above the axis, units disposed of in a column under the axis and net units as a line. I have trend lines on 3 months average for both the units gained and disposed of. I am now being asked to show units massed moved under the line stacked on the diposal units. How do I accomplish this? I looked for a custom graph in Excel and cannot find one to do what I want. Can anyone help me? --- Message posted from http://www.ExcelForum.com/ Draw your own custom chart. For an existing chart, right click on it, select Source Data from the pop up menu, and click...

Product Key Problem
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I have been following Diane MVP discussion re Entering a Product key&quot; but may it may have closed out with her having resolved the problem; hence 'new' question. <br><br>I have had MSO 2008 running fine on my iMac (updated to 12.1.0) and my new MBPro(Core i5 10.6.3) - that was until I attempted to update it further on my laptop. Having downloaded the updates 12.1.5 through to 12.2.4, it continually comes up with &quot;this version does not recognise your Product ID&quot;. <br><br>I ...

Problem with sharepoint web part / authentification
I receive this error when displaying the active accounts view in sharepoint: An error has occurred. This Web part could not be displayed. ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Setup: 1 Windows 2003 server with SQL. 1 Windows 2003 server with CRM, Sharepoint 2.0. (tried Sharepoint 3.0, same error). Latest web part. I tried lots of steps written in numerous logs or microsoft technet docs without succes. I would appreciate some help, i'm totally stuck. ...

Stack overflow question
Occassionally when on Facebookwith MSIE if I have 2 instance of Facebook open (Different pages) I will get an error message of "Stack Overflow at Line: 31". When I click OK the page finishes loading fine. Any suggestions as to what is going on? Running: <<< System Summary >>> > Manufacturer : eMachines Inc. > Mainboard : eMachines WMCP61M > Chipset : nVidia GeForce 6100V > Processor : AMD Athlon Neo MV 26 @ 1600 MHz > Physical Memory : 4096 MB (2 x 2048 DDR2-SDRAM ) > Video Card : NVIDIA GeForce 6150SE nForce 430 ...

Stacked charts #4
Hi I want to to create a chart where the colour changes when ever a value is reached. Ex. I have a mashine that produces 1000 it's goal is 2000. The chart should then show a column that is red because it is under the goal. I also have a maschine that produces 3000 and the goal is 2000. The coloum should then change to green. Is it possible to make a chart like this in excel? Regards Ticotion On Thu, 21 Jun 2007, in microsoft.public.excel.charting, Ticotion <Ticotion@discussions.microsoft.com> said: >I want to to create a chart where the colour changes when ever a value is &...

Problem with Recurring Appointments in Outlook 2000
When I try to open/delete a recurring appointment, it gives me the following error message: "Cannot read one instance of this recurring appointment. Close any open appointments and try again, or recreate the appointment." After getting this error message, I cannot get rid of it and I have to do Ctrl+Alt+Delete to close out of Outlook and restart it again. Is there a way to get rid of this appointment? Please help! ...

Help! Setfocus problem
i ave a dropdown field on the first tab. I use setfocus so that it selects a different field to stop users scrolling down and changing the selection on the load event. Problem When a user changes tab and come back to the origional tab the setfocus doesnt run as the form is already loaded. How do you get around this? This is driving me and users mad at minute...please help before i open another bottle of dark rum! Hi Brian, Check out following URL; how to fire onclick event on tab click. It may help you. http://crmrocks.net/?p=16 -- PLEASE do click on Yes or No button if this post wa...

Userform Import problem
Hi all This relates to MSProject, but the same problem happens in excel in this instance. I have 2 global modules. I also have a userform with custom jpegs in it, which when exported create the .frx accompanying file with the .frm When I go to 2 different peoples machine to import the new global modules I have written for them, the modules come in fine. When I try and import (either by rightclick > import, or by drag'n'drop) the userform, it gets added as a global module. Anyone know what the problem is? It's rattling my brain and the modules won'...

MTA Problems
I have an exchange 5.5 Enterprise server that will not process messages in the MTA Queue. Does anyone have any suggestions? When looking at the MTA queue viewer, what is the exact queue the messages are in? MTA sends messages to store and other servers. Please provide info requested above so we can better answer your question. -- This posting is provided "AS IS" with no warranties, and confers no rights. Please do not send email to this address, post a reply to this newsgroup. "Roger" <anonymous@discussions.microsoft.com> wrote in message news:2aad01c3a986$d1e08...

Problem.... Nested countifs?
I want to be able to count the number of clients who are marked as "X" in column Q .... and who are marked as "Low" in column M. I tried countif... but it counted the number of clients marked Low and added it to the number of X's. tia Nick. try =sumproduct((q2:q200="X")*(m2:m200="Low")) -- Don Guillett SalesAid Software donaldb@281.com "Nick" <morpheseus@hotmail.com> wrote in message news:BbB3e.878545$Xk.1243@pd7tw3no... > I want to be able to count the number of clients who are marked as "X" in > column Q .....

CListCtrl problem
I would like to know how I could find which column of a listview I have clicked on. I have a listcctrl which is of type report and it has 50 rows with 20 columns. I have been able to find out which row has been clicked but I need to find out which column. Urgent help needed please!! Thanks in advance. >-----Original Message----- >I would like to know how I could find which column of a listview I have >clicked on. >I have a listcctrl which is of type report and it has 50 rows with 20 >columns. >I have been able to find out which row has been clicked but I need to find...

Outlook 2000 opening problem
I have an Exchange Server(5.5)on Windows 2000 with 25 users. Sometime it happens that no user can open their mailbox from MS Outlook 2000. While opening, after giving user name, domain,& password, it just hangs up. I have then tested the same mailbox using OWA & it opens. I restarted the Server & found the problem vanished. This problem comes periodically (15/20 days inetrval) and requires the Server to restart. Pl. give me the solution. Tushar ...

the solution if you're having problems printing a mail merged document.
http://word.tips.net/Pages/T001126_Printing_Portions_of_Mail_Merged_Documents.html " 1. Choose the Replace option from the Edit menu, or press Ctrl+H. Word displays the Replace tab of the Find and Replace dialog box. (Click here to see a related figure.) 2. In the Find What box, enter ^b. This is the code for a section break. 3. Click on the No Formatting button, if it is available. This removes any formatting specifications in what you are searching for. (You may need to click on the More button to see the No Formatting button.) 4. In the Replace With box, en...

stack
Hi, I am writing a c application, but when I put a member inside a function I get stack overflow, the member is an array of struct: mytype tArray[30]; mytype is struct of this type: typedef struct{ int x[500]; int y[500]; long l;}mytype; what is the size of a c function stack? can I define the size of the stack? (I am using visual studio 6) Thanks. Dave wrote: > Hi, > I am writing a c application, but when I put a member inside a function I > get stack overflow, the member is an array of struct: mytype tArray[30]; > > mytype is struct of this type: typedef st...

Problem with the paper size of my project
Hi, I live in mexico, and i am doing a small elementary school newspaper. I already finished doing it on Publisher. One of the rules of that newspaper is that it has to be made in paper size called Oficio (that is just about half and inch shorter than american legal paper size). but I started doing the newspaper using the legal size paper thinking that both Legal and Oficio were exactly the same (untill i printed them and see the incorrect results), now that i want to print it, there is no way i can configure the paper size for the requierements i need. I already check Office Online he...

Text Overflow
Hello, I am trying to create a page where there are 3 text boxes. If another page is needed I need for a new page to be created with the same 3 text boxes and if another page is needed etc. Here is the code I have.....but it is putting the 3 new text boxes on page 1 and creates a new blank page. What am I doing wrong? Sub Macro2() ' ' Macro2 Macro ' Macro recorded 12/23/2009 by Marsha ' ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 72#, _ 36#, 486#, 18#).Select Selection.ShapeRange.TextFrame.TextRange.Select ...