49,761 Topics
| |
hello all i dont know what is the problem ....... a very simple change in the order of functions make the program goes in infinite loop this code works will [CODE=cpp]#include <iostream> using namespace std; int main() { int i; while(true) { cout << "\nEnter Intger:"; cin >> i; if … | |
Objective The objective of this assignment is to provide hands on experience of using Classes and Objects Dynamic Memory Allocation in C/C++ Friend Functions Program Write a C++ program that contains a class named Student having following data members: 1. stdId 2. stdName 3. stdAge 4. stdProgram 5. noOfSubjects. The … | |
When I try to compile g++-4.2 memJpegDecoder.cpp I get these errors. [code] /usr/lib/gcc/x86_64-linux-gnu/4.2.1/../../../../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /tmp/cci2IOXX.o: In function `memJpegDecoder::decompress()': memJpegDecoder.cpp:(.text+0x5b5): undefined reference to `jpeg_calc_output_dimensions' memJpegDecoder.cpp:(.text+0x68a): undefined reference to `jpeg_start_decompress' memJpegDecoder.cpp:(.text+0x6ac): undefined reference to `jpeg_read_scanlines' memJpegDecoder.cpp:(.text+0x730): undefined reference to `jpeg_finish_decompress' memJpegDecoder.cpp:(.text+0x739): undefined reference to `jpeg_destroy_decompress' … | |
If I declare a struct node, is the following legal in C++? [icode]node nodes_array[vector.size()];[/icode] I know this is not legal in C. However, my C++ compiler does not complain. Is this only in recent versions of C++, or has this always been legal in C++? | |
hi i created MFC dialog based application and in an event of a button i want to execute a C++ console application . i've tried severl functions such as shellexecute and create process ....but it executes it but then return the wrong answers .....where if i run the application console … | |
Hi there, Say I have a payload: 1) unsigned char apayload[] = {'H','i',' ','T','h','e','r','e'}; And then I have another payload, which is the same as above but with an additional 2 characters: 2) unsigned char received_payload[]={'H','i',' ','T','h','e','r','e,'a','b''}; How would I go about making the second payload exactly the same as … | |
hello all i want to know the proplem with this program and first ........ can i write a string object to a file normally like other objects ?? this is the code ......the program writes the file but it can't read it again [CODE=cpp] #include <iostream> #include <fstream> #include <string> … | |
Write a c++ program to enter an initial date and final date and print the number of fridays(13th) in between the range. | |
Hi everyone ! Im using Eclipse with CDT (C/C++ Developpement Tools). I often get this error message when starting Eclipse : "An error has occured. See the log file /home/usr/workspace/.metadata/.log" then it close. Here is the full log : [QUOTE]!SESSION 2008-07-04 10:17:06.950 ----------------------------------------------- eclipse.buildId=M20080221-1800 java.version=1.5.0_14 java.vendor=Sun Microsystems Inc. BootLoader constants: … | |
hello i programing the code && design the interfaces then , connect the programing with db "store the results in db" then connect the db with interface and appeare the results on edit boxes in the interface now , we want excute the programing code when click specific button .so, … | |
I want to convert outlooks pst file in xls i.e. excel file...through program in c++?? How to do this?? how to get all the data from inbox into another folder?? any command that converts these files from command prompt?? | |
Hi, [B][COLOR="Green"]How to retrieve the phone number stored as work number in Contacts list of Windows mobile?[/COLOR][/B] It has several fields like Mobile number,home number,bussiness number... I could able to retrieve these fields as there is direct API in IPoutlook. problem is with Work number. | |
I am writing a chess game to familiarize myself with the C++ language. I have a Board class which contains a 2D array of pointers to Piece objects. I want to implement Board::operator[] such that the following is possible: [CODE]Board b; Piece *p = b[0][0];[/CODE] I could just return a … | |
Ok. Originally I was trying to write a program that would calculate pi to infinite decimal places. The calculus baesd algorithm I made for this is flawless, except that C++ can only handle 16 digits! So I did some looking around, for libraries and what not, to find something that … | |
when i read from file1 then write to athor file2, file 1 writen on file 2 but if file 2 contain lines more than file 1 ,this lines stay in the file 2 don't empty the file2 then write on is there any solove to this problem? | |
I wan to read from multiple files and write into 1 file....the fuse_cortex_header_r function will read a file and then break the file into several file which only consist of classes...for fuse_cortex_header_w file, i would like to read all the files which have been writen by previous function and write … | |
Hi, I have written a program in python, and am looking to translate it into c++ code, here is the program: import random # You've got to guess 4 numbers between 0 and 30, if you get it right the program will output "WINNER" and tell you the computer's numbers … | |
Why doesn't this work? [code] #include <stdafx.h> #include <iostream> #include <string> using namespace std; int main(){ static int x; int y; cout <<"1. view\n2. edit\n"; cin >> y; if (y==1){ cout <<endl << x <<endl<<endl; } if (y==2){ cout <<"Please enter the value of x\n"; cin >> x; cout << … | |
I have 2 loops like below. In the second loop I am searching a string if I can find the "*" character. This loop will loop 100 times but what I am wondering is that if you wont find the character "*" in the string str, is is possible to … | |
hi; i dont know how to convert mp3 file to wave file. i want to convert it because reading data information from a wave file is more easy than mp3 file 'i think'. Can anyone help for this problem? | |
Hi all, Lets say Program A had opened a AAA.txt and had finished writing to it but didnt closed it as it is waiting for another patch of data to be written in around 1 mins or so. So in between the 1mins times can Program B copy its content … | |
Hi all, I am new to OOP. I am using classes to create a phone book in C++. I don't know how to program, when the user enters the information and click save to generate a file. Also, how do I make GUI using C++. Can any one help me … | |
Hi all, i am a new intern quant.. and i had almost never used C++!! i have to simulate the heston model [url]http://www.javaquant.net/papers/Heston-original.pdf[/url] the equations from the page 328 to 331.. so, i am using the Euler decompostion but i have some problems with using C++ if any one can … | |
// Lab 4 read and calculation file/input // This program will read the data in the input file // used by grosspayMinustaxFileCode #include <iostream> #include <iomanip> #include <fstream> using namespace std; int main() // this is the error message it displays if not working right to EXIT { ifstream inFile; … | |
I have declared a map like below. What I have some problem with is how it is possible to set the double Number1 to have the value of "Numb". I am not really sure I have understand how the mapping works here. [code] std::map<std::string, double> numb; void Test() { double … | |
I have a function which takes an array of SDL_Rect (which is a data structure containing four integers, x, y, h and w), and assigns values to the data members. However, when I try to compile, each line generates the error "error C2059: syntax error : '='". [CODE] int main() … | |
I am trying to implement the composite "structural pattern". The attached code compiles but when I run the exe file the memory collapses. Here is the code: [code] #include <iostream> #include <iomanip> class CTreeComponent { public: virtual void traverse(int)=0; }; class CTreeLeaf:public CTreeComponent { public: CTreeLeaf(int wert):m_wert(wert){} void traverse(int tiefe){std::cout<<m_wert<<" … | |
I am experimenting with a piece of code I found on the internet (I'm still relatively new to c++), but my visual c++ express edition and visual c++ 2005 ide's are not compiling it giving some errors I can't understand fully. this is the code [code=cplusplus]/**************************************************** * File: BasicCalculator.h * … | |
Hi I am trying to learn c++ by using it where I can at work. Usually I can muddle through by searching forums and although I might not end up with an elegant piece of code, my programs seem to work ;) What I am trying to do, is open … | |
hi friends, I am having a problem with IO operations in C++. This is the path: ----------------- C:\Symbian\9.1\S60_3rd_MR\Epoc32\winscw\c\system\Apps\test\ I am having 4 files say f1.txt (size 400 KB) f2.txt (1 kb) f3.txt (1 kb) f4.txt (1 kb) These four files reside in the following above given path. The files in … |
The End.