49,761 Topics

Member Avatar for
Member Avatar for supershame

Hi, Im getting segmentation fault in calling getDocument. I have a class Sample which is the parent node. Im getting 0 as a return here's my code. parser code: int xml::load(const char* xmlFile){ try { XMLPlatformUtils::Initialize(); // Initialize xerces } XercesDOMParser* parser = new XercesDOMParser(); parser->setValidationScheme(XercesDOMParser::Val_Always); parser->setDoNamespaces(true); ErrorHandler* errHandler = …

0
37
Member Avatar for digital_signage
Member Avatar for hiddepolen
0
54
Member Avatar for smallB

Hi, I have a problem with linking boost libraries in codeblocks using gcc 4.6.1. I'm getting following errors: undefined reference to `vtable for boost::unit_test::unit_test_log_t' How can I solve it?

Member Avatar for smallB
0
158
Member Avatar for mcclainra

I've been given a basic form of programming to do. And I simply cannot figure it out. I know this topic has been covered several times before. But each of them going around the one crucial step that I need to complete my programming. My instructor insists that the 24 …

Member Avatar for mcclainra
0
2K
Member Avatar for UNDER-18 FG

Hi. I'm new here. Anyway, I have an assignment of writing programs from outputs provided. Here's an output given in the assignment that I think is wrongly done. I'm saying this because I tried many, many times just to get the exact output, but only to no avail. So, I …

Member Avatar for UNDER-18 FG
0
123
Member Avatar for champa anand

Hi, Here is the code [CODE]bool A::clear(void) { if (m_active) { return val; } else { return true; } } // end A::clear bool A::initialize(void) { if (m_active) { return clear(); } else { return true; } } // end A::initialize[/CODE] getting the below segmenation fault as soon as it …

Member Avatar for champa anand
0
90
Member Avatar for cyberguy007
Member Avatar for sanof3322
0
29K
Member Avatar for gotnos

I have tried to structure my program but im stuck at this point. I have a file that contains phone phrases on each line (1-900-WINNING) is one of the phrases, if i get more digits than a phone number requires i must ignore the remainder. This data is coming from …

Member Avatar for WaltP
0
148
Member Avatar for stereomatching

compiler : gcc4.6.2(minGW), vc2010 os : win7 64bits [CODE] int A[10]; srand(0); std::generate(A, A + sizeof_array(A), [](){ return rand() % 100; } ); std::vector< std::unique_ptr<int> > v; std::for_each(A, A + sizeof_array(A), [&](int const Cur) { v.push_back(std::unique_ptr<int>( new int(Cur) )); } ); std::sort( v.begin(),v.end() ); //result {1,4,8} for(auto it = v.begin(); …

0
88
Member Avatar for stereomatching

I do some experiences about boost::bind And I find out that boost::bind would incur heavy copy if you don't pass by referene [code] #include<iostream> #include<boost/bind.hpp> struct test_for_bind_00 { test_for_bind_00() {} test_for_bind_00(test_for_bind_00 const &Obj) { std::cout<<"this is copy constructor :: tfb00"<<std::endl; } }; struct test_for_bind { void tamaya() { std::cout<<"tamaya"<<std::endl; } …

Member Avatar for stereomatching
0
311
Member Avatar for Zssffssz

well it sounds simpler than OpenGL... I want to use DOS style graphics in my prog (look at SC2000) no need for animation or interactivity or PostPicture(). So the queston is what header/librays do I need and how do i use it? Google just brought up stuff on makeing your …

Member Avatar for Zssffssz
0
215
Member Avatar for ggreen33697

I'm having trouble writing a for loop that asks the user to input the number of seconds an object falls and the height it falls from. the program has to calculate the distance fallen for each second using the formula d=0.5*g*t2

Member Avatar for Clinton Portis
0
112
Member Avatar for Labdabeta

I am VERY confused by the Doxygen configuration file. I cant seem to figure out how to make it compile code between [ICODE]#ifdef __cplusplus[/ICODE] and [ICODE]#endif[/ICODE] Also I dont understand how to change what it does with preprocessor symbols or how to make it NOT generate documentation on something. Any …

Member Avatar for mike_2000_17
0
157
Member Avatar for Tom_Weston

Basically, what i would like is if the two letters are attached together (NOT seperated) in the string, it will say good, if not the bad. Example: [CODE] #include <iostream> #include <string> int main () { string letters = "or"; string test = "The man went to the store."; //here …

Member Avatar for WaltP
0
155
Member Avatar for Labdabeta
Member Avatar for rubberman
0
139
Member Avatar for toneranger

I have some stock market price data organized as follows in a structure: struct PriceInfo { string Date; unsigned int Time; double Open; double High; double Low; double Close; unsigned int Volume; }; This struct organizes price data per interval of date and interval of time, where time is measured …

Member Avatar for toneranger
0
850
Member Avatar for Algorithms

Hi brand new, Okay so I have an exercise I'm doing to better help understand C++ programming. This isn't a project or homework assignment. I'm doing this for practice and to better my skills as a programmer. I have the logic down, now I just need to add to the …

Member Avatar for hiddepolen
0
936
Member Avatar for valestrom

Hey, I was just wondering how I can get it so when I click a button it opens my second form. But sets some of the labels to a specific thing, so I don't end up making 170+ forms for my periodic table application. Just like so when I click …

Member Avatar for triumphost
0
201
Member Avatar for akhlakeng

how to do this? : ask the user to insert the length of two sides (b and c) of a tringle and the angle between them in degree (x), compute and print the length of the third side,a, by using this formula a^2=b^2+c^2-2bc(cos(x)) (Note: to use the cosine function(cos), the …

Member Avatar for WaltP
0
255
Member Avatar for Getenks

I dug a lot around the internet to find a .Chr Editor/Opener .CHR file I pointed refers to the one Borland Made. It is a Character Set File or more like a Font file.. Turbo C++ uses this file format. I was hoping if anyone could help me find its …

Member Avatar for WaltP
0
27
Member Avatar for jaepi

Hello there, I have here a problem with the function open(). Since its first parameter asks for a char*, how would i convert wchar_t* to char* if my program asks for a wchar_t* as its path rather than char*?

Member Avatar for epolgar
0
10K
Member Avatar for clide890

Effective January 1st of each year, Gabriela receives a 5% raise on her previous year’s salary. She wants a program that calculates and displays the amount of her annual raises for the next three years. The program also should calculate and display her total salary for the three years. Annual …

Member Avatar for Fbody
0
357
Member Avatar for vishwanath.m

hey guys!!! iam just working on speed of the codes.. and i just want to extract the last bit of the given variable.could u help me??? note:dont extract the bits by dividing it by 2:):)

Member Avatar for vishwanath.m
-1
128
Member Avatar for imolorhe

What are the possible uses of the bitwise operators. i.e. bitwise AND, bitwise OR, bitwise XOR, shift right, shift left and complement. Also, what are the applications of bitwise operators in everyday problem solving. Examples would be nice. Thanks in advance

Member Avatar for daddymummy
0
221
Member Avatar for akhlakeng

Write a program to calculate the power consumed by a heater. This program also calculates the resistance value for the heater. The program’s design should use main that calls the three functions described below: a) getData : Read data from the keyboard. This function is to use reference parameters (pass-by-reference …

Member Avatar for akhlakeng
-4
350
Member Avatar for cypherscouter13

I try to run the following, but I keep getting the error "error C2664: 'Card::SetName' : cannot convert parameter 1 from 'const char [23]' to 'char'" I also got the following error; error C2664: 'Beginning' : cannot convert parameter 2 from 'std::vector<_Ty>' to 'std::vector<_Ty> &' I'm not that familiar with …

Member Avatar for cypherscouter13
0
162
Member Avatar for opawix

Hello ma'am/sir any help for the codes of input to be align.heres my code: [CODE] #include<iostream> using namespace std; int main() { float pre, mid, semi, final, total; cout << "Prelim: "<<setw(20)<< "Midterm: "<<setw(20)<< "Semifinal: "<<setw(20)<< "Final: "<<setw(20)<< "Final grade: \n"; cin>>pre>>mid>>semi>>final>>total; total = (pre+mid+semi+final)/4; system("pause"); return 0; } [/CODE] …

Member Avatar for namratag
0
101
Member Avatar for Powerponken

Hi, This is probably some basic knowledge but I haven't found it out. I have this snippet of code that is causing me problems: [CODE] HANDLE hFile; char lpBuffer[100] =""; char idBuffer[100] = ""; DWORD ofs; strcpy(lpBuffer, fingerprint); strcat(lpBuffer,"\0"); hFile = CreateFile(buffer,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); WriteFile(hFile,lpBuffer,sizeof(lpBuffer), &ofs, NULL); strcpy(buffer,""); if(ReadFile(hFile, …

Member Avatar for Ancient Dragon
0
180
Member Avatar for hariharan89

Hi , I am a newbee to visual c++ 2008, I have to include a RTP prtocol library JRTPLIB into visual c++ 2008. could any one please brief the steps to do it. I dont know how to include these libraries into visual c++. with regards, Hari

Member Avatar for MonsieurPointer
0
108
Member Avatar for jonnyboy12

Hello. I am i'm recently taking off in building a game. The problem at the moment, is that i fear i'm programming to much! I wouldn't know this because i'm new to c++, but how much code is too much for a modern processor? In my engines render loop i …

Member Avatar for sundip
0
268

The End.