49,761 Topics
| |
hi i just done my program and the input have some digits gone from it.i don't know how to recorrect it so i will like to seek advice here please [CODE] #include <iostream> #include <cmath> using namespace std; void convert(int , int, int, int*); //convert(number, base, length, result) int len=0, … | |
hi guys! i need help ! what's wrong of this code?? this program will input five names and will output the five names i inputed. but when i run this program and i inputed a five names. It couldn't give me the exact answer.. the output should be this: please … | |
I'm trying to write a program that will calculate rations, max, min, total and average #. I'm told I can use #include <algorithm> but I don't know how to use it. I need it to spit out something similar to the following: How many in the first category? 8 cats … | |
I was wondering if it's possible to ignore certain digits of a number, and how it would be done.It will always be a 21 digit number, and i want it to only use the last 7 digits of the number. Eg: 000J90120071000002291 is the number, and I only want it … | |
Is it possible to declare something like [code=C++] string blah[51] [/code] The way I would assume this would function is that each elements of the blah array would be a string, or is this not possible? Thanks Edit: just tried this in dev c++, and it didn't give me any … | |
My goal is to have a vector fileList of type ofstream that I could later loop through to write the same information to each of them (copying at the end is not an option). The list of files comes from argv (processed by getopt). I understand that I need to … | |
Hi. I am using an std::Vector and I have a question about memory allocation. I have a vector of animation objects inside my graphic object. I add new animations externally via this method: [code=c++] void Graphic::addAnimation( int* frames, AnimationStyle style, int frameCount, double updateInterval) { Animation* a = new Animation(frames, … | |
Hi i'm new to C programming, and i have this homework which i need to do on compounding interest, i would like to know whats wrong. it says, "Run-Time Check Failure #3 - The variable 'HoursWorked' is being used without being initialized." same with other variables. below is my code. … | |
Hi, I was wondering how you would intercept data on a given port without interrupting it in WINSOCK. Like if computer A sent computer B "hi" on port 1337 and it was received on a server program. How could I listen for that data on computer B, but still let … | |
im using windows xp, and ive installed and unistalled dev C++ several times and i can not get it to work (compile and run) for any program even "hello world". even the dev c++ examples show a [linker error]. the code exactly is: [Linker error] undefined reference to `__cpu_features_init' ld … | |
Hi I want to know some information about[COLOR="Red"] (( files ))[/COLOR] I specified two questions and I hope to answer them. [COLOR="Red"]First :[/COLOR] using function ( [I][B]read [/B][/I]and [I][B]write [/B][/I]) [CODE] fileName.write( reinterpret_cast< const char * >( & variableName ), sizeof( Ttype ) ) ; [/CODE] in binary files only … | |
hello i just to know how to define an array... when using a variable... for example... [code=c++ ] cin >> numb; int an_array[numb] [/code] when i try it...it tells me cannot allocate an array of constant size 0 and unknown size ... so could you please tell me how do … | |
in C++ i am getting two errors regarding illegal else without matching if , and i have dont i myself the last step of my project is to obtain the average of all non positive numbers and average of all negative numbers as well as the sum of just the … | |
Hi experts, please help me solve this problem: I compiled a program C++ by Linux gcc version 4 and the program can run perfectly in that computer. But when I run the program in another computer (Linux with gcc version 3. installed), it did not work and said: "Floating point … | |
what is the difference between the following two approaches: [CODE]#include <iostream> using namespace std; int main(int argc, char* argv[]) { cout << "argc = " << argc << endl; for(int i = 0; i < argc; i++) cout << "argv[" << i << "] = " << argv[i] << endl; … | |
Hi all, I have 4 '.cpp' files and 1 header files: [code] Tools.cpp Code1.cpp Code2.cpp Code3.cpp and Tools.hh [/code] Now all [code]Code1.cpp, Code2.cpp, Code3.cpp[/code] use functions stored in [code]Tools.cpp[/code]. Currently, what I do to compile all of them is using this simple shell script: [code] #!/bin/bash echo "compiling Code1.cpp"; g++ … | |
Hey, I'm trying to compile some sample projects from the Xerces Library, but when I try to compile the code it give me this error: LNK1104: cannot open file 'xerces-c_2D.lib' What can i do to get rid of this problem? | |
Hello, Please tell me What is an Abstract classes in C++ language? I'm waiting for your reply. Thanks In Advance | |
I want to attempt some win32, and have looked around on Amazon, safari books online , Google etc. I have seen a few books that look promising, but does anyone have any recommendations for any win32 books that they found helpful. | |
Hi Friends, Can anybody please give me a hint or soln. for how i can print 100! using C++ since the no. of digits are much larger and no data type can store it. | |
I have been trying for a few days to open a .pps file (power point slide show) from within my program, I have tried the following. [code=c++] ShellExecute(NULL, "open", "\\Test.ppt", NULL, "C:\\Program Files\\Pyrosoft\\Utilities", SW_MAXIMIZE); system("start C:\\Program Files\\Pyrosoft\\Utilities\\Test.ppt"); [/code] Both methods can open .txt files, in the same folder, but not … | |
I've been experimenting with GDI+ and i managed to draw 2 PNG in a button button. 1 for the normal state and one for the Clicked (down state) but when i click the button,the down state image gets draw on top of the normal state, and when i release the … | |
I just learned about returning a reference... and it seems to me that I can delete my mutators now? ie. [code] class foo { int A; //mutator void set_A(const int a) {A=a;} //accessor int get_A() {return A;} } int main() { foo MyFoo; int b = MyFoo.get_A(); //get MyFoo.set_A(4); //set … | |
[I]<<snip>> [/I] Original article can be found here: [url]http://www.cs.cmu.edu/~gilpin/c++/performance.html[/url] | |
Hello, I have coded an overloaded += operator and it is giving me trouble. basic function of the operator is to add data to dynamically allocated class array which has 3 member variables. [code=CPLUSPLUS] ie. savings[i].accountNumber; savings[i].balance; savings[i].customer; [/code] I have managed to get the first part of the function … | |
So as far as ive been able to tell, wxWidget basically allows for multi OS functionality and offers a few extra ways to handle things, other then that, is there a reason why you WOULD NOT want to use wxwidget? | |
Hi I am using Visual 6 C++ and try to retrieve a member's all closed trades. i declare a string as below: char str[8000]={0}; But this declaration is ok and the program work fine if the member's record size does not exceed 8000bytes. In order to be able to retrieve … | |
i want to solve the homework the quation of the home work the game of damca please i want it the day | |
Hello everyone, I have been trying to get this code to work, but so far all it does is tell me : Input the order of the Matrix(Keep it Odd):3 1.11286e-307 1 0 1.11341e-308 1.11286e-307 0 0 1.11343e-308 1.11286e-307 0 0 1.11342e-308 Press any key to continue . . . … | |
| I have a sniffer in c++ but it is working in xp32 bit , i am getting the full payload also both sending and receieving ,but in xp 64 bit computer system whenever the firewall is turned 'ON' mode the sniffer is not getting the payload of sending pakects. but … |
The End.