49,761 Topics

Member Avatar for
Member Avatar for MyRedz

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, …

Member Avatar for MyRedz
0
120
Member Avatar for FrancisC07

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 …

Member Avatar for MyRedz
0
96
Member Avatar for mcamacho07

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 …

Member Avatar for mcamacho07
0
144
Member Avatar for Corus

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 …

Member Avatar for Corus
0
173
Member Avatar for clutchkiller

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 …

Member Avatar for clutchkiller
0
89
Member Avatar for IVantToVin

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 …

Member Avatar for Agni
0
2K
Member Avatar for mps727

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, …

Member Avatar for Rashakil Fol
0
7K
Member Avatar for nickichl

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. …

Member Avatar for nickichl
0
276
Member Avatar for TheBeast32

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 …

Member Avatar for TheBeast32
0
701
Member Avatar for BigJermZ

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 …

Member Avatar for Stefano Mtangoo
0
132
Member Avatar for mini programmer

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 …

Member Avatar for mini programmer
0
145
Member Avatar for deviantrunner

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 …

Member Avatar for MosaicFuneral
0
103
Member Avatar for rock9449

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 …

Member Avatar for StuXYZ
0
108
Member Avatar for movingforward

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 …

Member Avatar for StuXYZ
0
149
Member Avatar for serkan sendur

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; …

Member Avatar for shasha821110
0
105
Member Avatar for gundalav

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++ …

Member Avatar for StuXYZ
0
157
Member Avatar for jake88

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?

0
74
Member Avatar for Emma1

Hello, Please tell me What is an Abstract classes in C++ language? I'm waiting for your reply. Thanks In Advance

Member Avatar for skatamatic
0
79
Member Avatar for noodlecode

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.

Member Avatar for mostermand
0
83
Member Avatar for tusharag171

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.

Member Avatar for iamthwee
0
56
Member Avatar for CodeYou

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 …

Member Avatar for mostermand
0
113
Member Avatar for I_want_to_lean

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 …

Member Avatar for Nick Evan
0
276
Member Avatar for daviddoria

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 …

Member Avatar for daviddoria
0
211
Member Avatar for meabed

[I]<<snip>> [/I] Original article can be found here: [url]http://www.cs.cmu.edu/~gilpin/c++/performance.html[/url]

Member Avatar for Lisa1110
3
1K
Member Avatar for kenji

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 …

Member Avatar for Agni
0
120
Member Avatar for clutchkiller

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?

Member Avatar for Nick Evan
0
80
Member Avatar for pacx

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 …

Member Avatar for pacx
0
164
Member Avatar for hebosh88

i want to solve the homework the quation of the home work the game of damca please i want it the day

Member Avatar for seanhunt
-2
103
Member Avatar for sonygamer

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 . . . …

Member Avatar for MosaicFuneral
0
638
Member Avatar for satheeshsoft

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 …

0
34

The End.