473,387 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Stack Fault in Turbo c++. Well this program should show the maximum value from each c

And this is my program.

#include<iostream.h>
void main ()
{
int a[100][100], i,j,m,n;
cout<<"number of lines : ";
cin>>n;
cout<<"number of columns : ";
cin>>m;
for(i=0;i<n;i++)
for(j=0;j<m;j++)
{
cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j];
}
for(j=0;j<m;j++)
{
int max=0;
for(i=0;i<n;i++)
{
if(a[i][j]>max)
max=a[i][j];
}
cout<<max<< " ";
}
}

Well this program should show the maximum value from each column. Unfortunately , when i run it in Turbo C++ , apears a Stack Fault at 0002:000E. Please show me how can i resolve this problem
Jun 9 '14 #1

✓ answered by weaknessforcats

The code does not crash on my Windows 7 laptop using Visual Studio 2013. I used 10 lines and 10 columns.

Try stepping through the code using your debugger to pinpoint where the stack error occurs.

I assume you are keeping below 100 lines and 100 columns.

2 1313
weaknessforcats
9,208 Expert Mod 8TB
The code does not crash on my Windows 7 laptop using Visual Studio 2013. I used 10 lines and 10 columns.

Try stepping through the code using your debugger to pinpoint where the stack error occurs.

I assume you are keeping below 100 lines and 100 columns.
Jun 9 '14 #2
allright...so the code does't crush on other program. pff...then i think that my Turbo C++ has a problem. Thanks for help :D
Jun 11 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mullai | last post by:
0Hi, My exe comes out with two types of errors like : 1.PG1609VV caused an invalid page fault in module KERNEL32.DLL at 017f:bff9dfff. Registers: EAX=07fbfe38 CS=017f EIP=bff9dfff...
3
by: evantri | last post by:
this is my nested loop to only show maximum z value only, but it always shows the last value of z. Could someone help me please? double x; double y; double z; int maxz = INT_MIN; for (x =...
29
by: garyusenet | last post by:
I'm trying to investigate the maximum size of different variable types. I'm using INT as my starting variable for exploration. I know that the maximum number that the int variable can take is:...
3
by: Madmartigan | last post by:
Hello I have the following task but am battling with the final output. How do I keep two different vectors in sync and how would I retrieve the index for the maximum value of one of the vectors??...
2
by: jocobunshin | last post by:
Hi there! I'm new in Turbo C... uhmm our teacher gave us a project to make a program in Turbo C. Im from the Philippines, and our project is due on tuesday, februrary 13, 2007... can anyone check my...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the VScrollBar and set it as follow: m_vScrollBar.Minimum = -19602; m_vScrollBar.Maximum = 0; m_vScrollBar.SmallChange = 1; m_vScrollBar.LargeChange = 1089; m_vScrollBar.Value =...
2
by: sajib0189 | last post by:
Sir, i m very new in javascript program... please help me my problem is ... 3 different text box showing 3 values (AC current phase difference) like: 130,133,135 in name of R,S,T and all...
10
by: rusty uts | last post by:
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...
2
by: kapadiamohit | last post by:
#include<stdio.h> #include<conio.h> void mergesort(int ,int,int); void merge(int ,int,int,int); void main() { int data,i,no_elements; printf("\n enter no. of elements...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.