-1

My XML File size is 252 KB. where I Try to search using fisrt_node function using the below statement

root_node = doc.first_node("cdf",0,false);

where cdf is my root node then the program crashes giving segmatation fault error. if I search node that does not exist in my xml then it simply returns null.

I hope someone helps me

Minhaj Patel
  • 581
  • 1
  • 5
  • 19
dheeraj
  • 7
  • 4
  • Welcome to stackoverflow.com. Please take some time to read [the help pages](http://stackoverflow.com/help), especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). Also please [take the tour](http://stackoverflow.com/tour) and [read about how to ask good questions](http://stackoverflow.com/help/how-to-ask). Lastly please learn how to create a [Minimal, Complete, and Verifiable Example](http://stackoverflow.com/help/mcve). – Some programmer dude Sep 20 '18 at 09:47
  • Also please read [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/), and [learn how to debug your programs](https://ericlippert.com/2014/03/05/how-to-debug-small-programs/) – Some programmer dude Sep 20 '18 at 09:47

1 Answers1

-1

Issue is with the root_node variable. if I make it global it gives error and if I make it local it works fine for me.

dheeraj
  • 7
  • 4