Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird Segmentation fault

Status
Not open for further replies.

csripriya1

Programmer
May 13, 2003
35
US
Dear All,
I am having problems with locating segmentation fault in my code. My code is in C++. I get segmentation fault when I call a function B. I do not get any fault with the segmentation fault with funcation A, when I use it in the place of function B. The difference between the functions
A and B is as follows:
< float Evaluate_chrom(char *trjfileBE, char *trjfileMC,
< char *trjfileSE, float fit_func[])
---
> float Evaluate_chrom(char *trjfileBE, char *trjfileMC,
> char *trjfileSE, char *trjfileDS, float fit_func[])
18a19
> cout<<"THE STR4: "<<trjfileDS<<endl;
101c102

There is one argument more for the function B and one print statement.The call for these functions A and B are as follows:
Evaluate_chrom(str1,str2,str3,fit_zsco);
Evaluate_chrom(str1,str2,str3,str4,fit_zsco);

I am wondering why this happens. I am breaking my head for the past 2 days. Any help in this regard will be very much appreciated.

Thank you very much.
 
Well without posting more relevant code, it's going to be hard to say anything concrete.

Please use the [tt][ignore]
Code:
[/ignore][/tt]
tags when posting code.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top