49,757 Topics

Member Avatar for
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
694
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
103
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
Member Avatar for godnseeker

please can anyone tell me that i want to create a rectangular spiral in c++. (I use borland c++) u can show the picture

Member Avatar for Rashakil Fol
0
79
Member Avatar for tarekkkkk

plz help and yes submit a direct link if u can and thx for advance plz hurry up i have assignment next week i have to finish it lol

Member Avatar for jbennet
0
799
Member Avatar for serkan sendur

Do i need to declare private class member functions in header files? or just the public functions are enough?

Member Avatar for serkan sendur
0
79
Member Avatar for jdm

I was wondering if it was possible to call a random image in c++. I'm using Dev C++. [code=cplusplus] #include <time.h> #include <stddef.h> #include <iostream> #include <string> #include <ctime> #include <cstdlib> using namespace std; const string password("password"); int main() { string x; cout << "Type the password to gain access …

Member Avatar for Freaky_Chris
0
191

The End.