51,593 Topics

Member Avatar for
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
155
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
107
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
159
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
75
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
82
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
85
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
59
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
125
Member Avatar for Emma1

Hello, Out of fgets() and gets() which function is safe to use and why? Thanks

Member Avatar for Ancient Dragon
0
112
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
283
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
214
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
122
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
81
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
168
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
104
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
640
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
82
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
806
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
81
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
196
Member Avatar for sai56

Sorry,does anyone know how to play a video file in visual c++ window form application?I need to play a video file in it..but have no idea about hw to do it..Thanks.

Member Avatar for William Hemsworth
0
102
Member Avatar for kishendra

C PROGRAMMING ASSIGNMENT 1. Express, using pseudo code, the algorithm to compute the nth root of a whole number (for example, the square root of the whole number for is 2). 2. Prepare a flow chart for the above algorithm. 3. The following has to do with the design of …

Member Avatar for me_ansh
0
158
Member Avatar for Avaviel

This is for a class. Two of the files are provided, and I need to write the third. I'm having trouble with a constructor in a class. The constructor is called with 'Logbook testLog(month,year)' and it saves the month and year correctly. The daysInMonth function works fine. My problem is …

Member Avatar for Avaviel
0
175
Member Avatar for shasha821110

is there have a way the stack's initial size is 0, it should still be possible to push values onto the stack. Here is my code: [code=cplusplus] class IntStack { int *p; int top; int maxlen; public: IntStack(); IntStack(int); ~IntStack(); void push(int); int pop(); void push (int a[], int array_size); …

Member Avatar for shasha821110
0
92
Member Avatar for Dendei

Hi i got an problem i need to read from an text file that i got from an excel file at start. so i want each block in the excel file to have one space at the array i saved it so it got seperated by ; example: [code] 4 …

Member Avatar for Dendei
0
232
Member Avatar for AdRock

I'm trying to get each line of text of a file split into words and then put into an array I found an exmaple oc cpluscplus.com and their example works but when i try to edit to make changes to read the line of text from a file i get …

Member Avatar for Murtan
0
2K
Member Avatar for TasostGreat

after compiling my prog i ran it with the command time [CODE]time ./a.out[/CODE] and it gave me this output [CODE] real 0m0.844s user 0m0.172s sys 0m0.596s[/CODE] what does this output mean ?

Member Avatar for Nick Evan
0
108
Member Avatar for daviddoria

I would expect this to ouput the 5 doubles, but instead I get the output below. [code] vector<double> a(5); a.push_back(1.2); a.push_back(1.3); a.push_back(1.4); a.push_back(1.5); a.push_back(1.6); vector<double>::iterator i; i = a.begin(); while( i != a.end() ) { cout << *i << endl; i++; } [/code] [code] 0 0 0 0 0 1.2 …

Member Avatar for daviddoria
0
77
Member Avatar for Nicklorion

Hi peeps i've got an problem with space and tabs in a text file. i've build an app that reads a file and creates an array out of every line. this works just fine but then I noticed that the array is cut of after every space and/or tabular. it …

Member Avatar for Nicklorion
0
143
Member Avatar for Aundrey

Hi Guys, I'm looking for this program that i can type in about 10 letters and 10 numbers and it will generate for me all the sequences that exist in those numbers, is there such program?

Member Avatar for Nick Evan
0
142
Member Avatar for TobbeK

Hi I am completely new to C#, so please bare with me .... What I am like to do is to pass variable values between the methods below, and finally print the results in the last method. I have commented the code with explanation. This is for test purposes and …

Member Avatar for ddanbe
0
163
Member Avatar for jake88

Hey, I have a template xml file that i am passing a pointer to into a function. In that function i need to read and write into the template and pass it as the output file. What is the best way to go about reading and writing in the template? …

Member Avatar for jake88
0
291
Member Avatar for riahc3

Hey Why does the following code comply in Dev-C++ and it DOESNT in MS VS 6.0? [code=C] #include <ctype.h> #include <errno.h> #include <limits.h> #include <float.h> #include <locale.h> #include <math.h> #include <setjmp.h> #include <signal.h> #include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> void main() { int num; …

Member Avatar for riahc3
0
134
Member Avatar for nnhamane

Hi frnds, when i compile VC++ project on 32 bit machine then it wont work on 64 bit machine...can we compile the same code so that it will work on 32/64 bit machine?? someone told me abt compiler option..but i dont know abt cmd...if u know something, then plz share …

0
60
Member Avatar for maykofs

Hello! Can somebody help me? I'm reading C++ for Business Programming and there is a exercise asking for a program able to write the folowing: X XXX XXXXX XXXXXXX XXXXXXXXX XXXXXXXXXXX XXX Using nested loops someone can solve this?

Member Avatar for yukapuka
0
141
Member Avatar for Speedy Hawk

This is my coursework. It is test a web server written in C++ code. It must be concurrent server using Posix threads. I have got skeleton server programe already given to me (Everyone gets that). That works perfectly. I am using linux to test and write the code. I need …

Member Avatar for Speedy Hawk
0
131
Member Avatar for noureenjee
Member Avatar for CPPRULZ

Hello I was making a program called englishweight and it has three main components englishweight.h which is a class declaration, englishweight_def.cpp which defines the public member fucntions, and EW_driver which uses the class to calculate what to do with the englishweight and preforms very basic operations. My program works WITHOUT …

Member Avatar for Manutebecker
0
189
Member Avatar for homeryansta

[CODE=C++]/************************************************* Student: xxxxx ID number: xxxxx Instructor: Dr. Julstrom Class: CSCI 301 Project 1 *************************************************/ #include <iostream> #include <cmath> #include <cctype> using namespace std; const int SIZE = 61; int getinput(char []); void compare(char [], char [], int, int); /************************************************* The purpose of this program is to have a user …

Member Avatar for homeryansta
0
208
Member Avatar for arun_lisieux

QUESTION : 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? While trying to solve this problem, i came up …

Member Avatar for arun_lisieux
0
496
Member Avatar for ashishchoure
Member Avatar for noureenjee

[code=cplusplus] #include<iostream.h> #include<conio.h> using namespace std; class Array { private: int* ptr; int size; public: Array() :ptr(0), size(0) { } Array (int s) : size(s) { ptr= new int[s]; } Array(Array&); ~Array() { delete[] ptr;} int& operator [] (int j) { return *(ptr+j); } Array& operator = (Array&); }; // …

Member Avatar for noureenjee
-1
142
Member Avatar for noureenjee

is there any disadvantages of objects as class members. If yu know plz share with me

0
40
Member Avatar for sonakrish

hi all... Am a beginner in c#. wen i place a control in a webpage and double click it i'm getting it's default event. how can i view its other events and how to include in my coding. Thanks in advance.

Member Avatar for sonakrish
0
118
Member Avatar for FrancisC07

i am using an two dimensional arrays... and i inputed five names on it.. anyone can help me on how to output the five names?? i dont need the whole program.. i just need the code... thnx... ^_^

Member Avatar for Agni
0
105
Member Avatar for thilinam

HI friends; I am in a trouble with circular array based queues. Please help me. I want to know how to attach element in to a circular array.

0
56
Member Avatar for shasha821110

Write my own string class is my assignment and there have some problems i can't figure out why? here is my code: [ICODE]//this is one kind of constructor--this one i couldn't change; String::String(char ch, size_t count /* = 1 */) { memset(m_buffer,ch,count); m_length=count; }[/ICODE] [ICODE]//this is overload operator String &String::operator …

Member Avatar for shasha821110
0
70
Member Avatar for jairh64

I recently downloaded Microsoft Visual C++ 2008 but I am disappointed that I cannot program using IOstream. I wondered I there was a way to install an IOstream library or is there a better compiler that allows me to program in IOstream??

Member Avatar for jbennet
0
30

The End.