49,761 Topics

Member Avatar for
Member Avatar for seebharath

Hi, I am using msxml4 for my project with an xml file of about 10mb. I read this xml file multiple times as it gets modified a lot during the application run. So I am using xmlDoc->release() after reading the xml file and performing the required operation on it . …

0
47
Member Avatar for kyosuke0

hi, i am trying to write a simulation for a very simple ALU and am having trouble with the AND/OR operations. I want to AND/OR integers bit wise with the two integers being passed to a function in hex form and the result returned in hex form so : int …

Member Avatar for John A
0
105
Member Avatar for Usura

Hey i have a weird problem when im trying to print out elements in my temp pointer array, at the bottom where im just using cout to print random indexs of temp, it will only work if i comment out temp[1]... anyone have any idea why? if its not commented …

Member Avatar for Clockowl
0
111
Member Avatar for hurbano

hello i was wondering when the final ouput to my program gets sent to the word document, is it possible to change the font that gets sent to that particular word document with the program and not just manualy changing it on word? [code=cplusplus] #include <iostream> #include <string> #include <fstream> …

Member Avatar for Clockowl
0
72
Member Avatar for sciwizeh

Hello, I have a question, when does a global variable get destructed? ex. [code=c++]#include <iostream> using namespace std; class simple { public: int *i; simple(int ni){ i = new int(ni); } ~simple(){ delete i; } } simple simple1(10); //for simplicity no command line int main(){ cout<<*(simple.i) } [/code] when will …

Member Avatar for ArkM
0
3K
Member Avatar for iammfa

Hi all, what is the bug in the following code: [code=cplusplus] #include <iostream> #include <string> int main() { string str = "Hello World!" cout << str << endl; cout << float x = 5.0f * str << endl; int 65Num = 65; cout << "65Num = " << 65Num << …

Member Avatar for stephen.id
0
138
Member Avatar for hurbano

i have my program doing what i want it to do untill it gets close to the end. the ouput that is transferred to the word document is not right. i have random charactes appearing before the "Date:". how can i fix this minor problem?? Thanks [code=cplusplus] #include <iostream> #include …

Member Avatar for hurbano
0
166
Member Avatar for Intrade

I don't get it... Why is it that whenever I view posts of homework assignments and projects that a fair amount of the time (in Computer Science or C++), it seems as if-- Oh hang on. I already know what'll happen from here. If I don't write a topic that …

Member Avatar for MidiMagic
0
220
Member Avatar for cam875

Is this the best datatype to use for doing calculations for extremely large numbers such as computing pi . Or am I going to need to create my own algorithm for handling extremely large numbers? how does software like superpi handle such a large number, im assuming its all split …

Member Avatar for cam875
0
95
Member Avatar for hhilo2002

Hi all, I am quite confused about the usage of both. Both of them seems to enable a variable to be shared consistently between classes. Is the following true? [B]Namespace[/B]-used for defining some constant values that you want to share in your application. [B]Static variable[/B]-used to maintain a consistent value …

Member Avatar for Ancient Dragon
0
5K
Member Avatar for Matzbyy

Hi, so my problem is that when I write a program, and then try to debug it, there comes a error, on VC++ 6.0 there is "Cannot execute program" And in VC++ 2008 express edition it says, that there ain't the file I'm trying to debug. Here's the output; 1>------ …

Member Avatar for Ancient Dragon
0
96
Member Avatar for gretty

Hello I have just started learning programming & this problem is really stumping me. I have to do a syracuse sequence (explained below) & I know my code below is very wrong, (it needs to use for statements in there) but can you give me any advice on what to …

Member Avatar for Shabtai
0
519
Member Avatar for ganmo

Hello, I've written couple of overloaded operators in my file containing Set declarations. I want to use these operators within the declaration file. However it seems it isn't used. Instead it uses the standard operators. e.g. i have two overloaded operators say <= and == [code=cpp] bool Set::operator<=(const Set& b) …

Member Avatar for ganmo
0
129
Member Avatar for kcomeby

Hello and first sorry for my very bad english. i have little knowledge about c and c++ but im trying to learn win32 programming with c++. its little hard and im very new at that. im trying to do very very simple thing: i have an main window, 1 button, …

Member Avatar for stephen.id
0
179
Member Avatar for mathueie

Hi I am using eclipse.I got error.I am using g++ complier. *.o : file not recognized: File format not recognized collect2: ld returned 1 exit status Please any one help me..[B][/B]

Member Avatar for tux4life
0
4K
Member Avatar for Clockowl

Hey guys, I was wondering, with this code: main.cpp [code=cpp] #include <iostream> using namespace std; class car { public: car (float speed) : speed(speed) {} car () : speed(0) {} void cruise(float speed) { this->speed = speed; cout << "New speed: " << getSpeed() << endl; } void brake(float power) …

Member Avatar for stephen.id
1
242
Member Avatar for fadia

hi guys,, i've this homework that i have to submit tomorrow.. and unluckily I didn't know how to do it.. it says : Write a program that outputs "Al Eid Song" words.. "The five days of Al Eid" Use a [B]switch statement [/B]to display the following output for the 5 …

Member Avatar for karthik.c
0
124
Member Avatar for cam875

Im having a problem with the while loop in my code, if I change what X2 is being compared to to anything other than 0 it doesnt hit the while loop, I am hoping its just some weird mistake. Thanks in advance for any help. [CODE] X2 = 0.5; while …

Member Avatar for cam875
0
103
Member Avatar for Laik

I am going to make OS. And I need help with GUI...how to make an GUI ?...I am not on Windows so CreateWindowEx() doesn't exist.

Member Avatar for adam1122
0
124
Member Avatar for sciwizeh

Hello all, I'm trying to make a simple text box with SDL, I have loosely based it off of [URL="http://lazyfoo.net/SDL_tutorials/lesson23/index.php"]The Lazy Foo Tutorial on sting input[/URL], but this code doesn't seem to work... [CODE]if(event.type==SDL_MOUSEBUTTONDOWN){ if(isIn(event.button.x,event.button.y)){ hasFocus=true; } else { hasFocus=false; } } if(event.type==SDL_KEYDOWN){ if(hasFocus){ if(event.key.keysym.sym!=SDLK_BACKSPACE){ str+=(char)(event.key.keysym.unicode); } else { if(str.length()!=0){ …

Member Avatar for sciwizeh
0
142
Member Avatar for Akis2000

ok iam working on a password protection for my program but i have a problem..... if the user set wrong password the program do this Wrong password!! The program will be terminated in 5 seconds but i want sec, (which is my seconds) at every second - 1 5-4-3-2-1 without …

Member Avatar for Akis2000
-1
787
Member Avatar for xcr

Hello all, This is my first post but i have lurked around the forums for a while (sans account) my problem is thusly: I have written a program to take information from a data file, copying values to a vector, allow the user to add/delete and print form this vector …

Member Avatar for xcr
0
143
Member Avatar for badboizEnt

please i was wondering if anyone could help me with my code, i feel its kinda too long and a good program should be as brief as possible... please would be very grateful. appreciated, cheers.. [CODE=cplusplus]int _tmain(int argc, _TCHAR* argv[]) { string Username; string Password; int terminator = 0, terminate …

Member Avatar for ajay.krish123
0
129
Member Avatar for shasha821110

Hi, all I am trying to write the function to get rid of my punctuations. My code: [CODE] //_word_list is the vector<string> type void TextUtil::isnotpuct() const { for(size_t i=0; i<_word_list.size(); i++) { size_t len = _word_list[i].length() + 1; for(size_t j=0; j< len;j++) { if(ispunct(_word_list[i][j])) { _word_list[i] = ""; } j++; …

Member Avatar for ArkM
0
73
Member Avatar for syarolazuan

Write a program that reads in an array of type int. Provide facility to either read this array from keyboard or from a file, at the user’s option. The output for the file input option should be stored in a file while the output for the keyboard input option should …

Member Avatar for Ancient Dragon
0
777
Member Avatar for nschessnerd

Is there any way to mix visual c++ with normal c++? like can i enable mixed code? i want to get rid of this error: 1>tab.h(32) : error C4368: cannot define 'p' as a member of managed 'Monitor4vc::tab': mixed types are not supported

Member Avatar for nschessnerd
0
222
Member Avatar for myselfantara

Hello Everyone, I am a new member in the forum. I had a question regarding a code. The code is not able to open the input file. Any help is appreciated. thanks Here is the code, [ICODE] #include <iostream> #include <fstream> #include <cstring> #include <cstdlib> #include <iomanip> using namespace std; …

Member Avatar for tux4life
1
215
Member Avatar for Turyturbo

Hello, This is my first time using forum to ask around for some assistance. I will make it briefly. [code] void main() { char *StringPtr; //pointer of char char String[26]; //array of chars strcpy(String, "abcdefghijklmnopqrstuvxyz"); if((StringPtr = new char[26]) == NULL) cerr << "\n\a allocation failed" << endl; else cout …

Member Avatar for ThundrbltMN
0
243
Member Avatar for shasha821110

Hi, all I got stuck by the erase function usage. here is my code: [CODE=C++] //A is my class //this function is used for judge weather there is a punctuation in //the word and get rid of it. void A::isnotpuct(const string& wordlist) const { size_t len = wordlist.length() +1; for(size_t …

Member Avatar for Narue
0
77
Member Avatar for yashyash

Dear friends I have a conversion from ascii to binary while when i use my input which is like this : 16078 16283 0.3708 16078 16837 0.4514 16078 17820 0.4038 16078 17906 0.3695 16283 16837 0.3905 16283 17820 0.4343 16283 17906 0.3262 16837 17820 0.5291 16837 17906 0.6245 17820 17906 …

Member Avatar for yashyash
0
86

The End.