51,593 Topics
![]() | |
Hello, I'm embarrassed for asking this question but for the life of me I cannot find an answer. This ultra simple code is giving this error as well as any other function that I'm trying to write. [CODE]a function-definition is not allowed here before '{' token expected `,' or `;' … | |
a mouse is trapped in a labyrinth.. and he has to find the cheese! the input is W and H (height and width), and a graph like this one: [CODE] ##...# C###.. ...... .####. .....M [/CODE] i'm supposed to calculate the shortest amount of steps he needs to make to … | |
Hey guys, I come over from C, wanting to learn C++. I have a nice little book but figured I could use a project to get me going. So I magicly crafted code, and ran into this problem: [icode]C:\Code\Rapture\World.h|7|error: ISO C++ forbids declaration of `Breeture' with no type|[/icode] With this … | |
Hello! All Well its a problem i have no idea about it ... check dis : i created a small graphics program.. like which draw a circle on screen.. it works very fine.. on other hand when i shift that code into my bigger program where i have used structers … | |
Menu.RC [CODE]POPUP "File" } MENUITEM "New", CM_NEW MENUITEM SEPERATOR MENUITEM "Save", CM_SAVE MENUITEM "Save As", CM_SAVEAS MENUITEM SEPERATOR MENUITEM "Exit", CM_EXIT { }[/CODE] I have another file with the definitions to CM_NEW, Etc. | |
Hello everyone!!! I just want to ask if is it possible to create a chat program that send and receive message, audio and video for Local Area Network... I want to create a program similar to yahoo messenger that includes the future of voice and video but the difference is … | |
hi i have an icon with atransparent background that i want to assign to an MFC dialog based application but the problem is that this icon appears to have a white background .... how to make it transparent ...... pleeease help | |
I have a template function as follows: template <typename T> int my_func(T& arg) T is expected to be of type map<T1, T2>. T1 is expected to be of a basic type (int, long, etc.) and T2 is expected to be of type vector<T1>/list<T1>/etc. I want to iterate over the contents … | |
The following code is a minimal example of what I am trying to do. When I compiled it with Visual C++ 2008 Express, I got the error: main.cpp(62) : error C2677: binary '*' : no global operator found which takes type 'Point<T>' (or there is no acceptable conversion) 1> with … | |
I'm using Microsoft Visual C++ 2008. How would i play a sound file? Either .wav, .mp3, or .midi hopefully. | |
Hi there: I defined several variables and assigned them values (nonzero) on a form. But I always got zero values of them when I cite them from another form. I am using BCB and never met this problem before even when I was doing the similar things. Can somebody give … | |
pleeeeeease can i get the full file path from specified file name (.exe) an arbitrary file (.exe) | |
I need to find the number of elements in an array passed into a function. The problem is in this case, sizeof() returns the size of the pointer itself. It only does this when passed through to a function. So here is that function: [CODE=c++] bool matchWord(TWORD *wordList, TWORD *word, … | |
I want to make a bot for Counter-Strike called Counter-Bot. Does anyone want to help? A disassembler would be good, too. | |
Hello all. I am new to the board and hope to build great relationships with other forum members. I am working on a program for class that is supposed to show the GCD. I used a text editor to make it, but when i put it in Visual express 2008, … | |
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 … | |
Hey, I know this question has been asked allot but I am wanting to know of where I could get a simple window GUI book, I am not wanting winprog, but infact a book, and tbh could you direct me to a good book, but is quite slow and has … | |
Hi guys :) I'm working on a project ( a game ) this is the code [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; //####### Begin Class Node ########### class Node { public: string data; Node* link; Node(string x) { data = x; link = NULL; } }; //####### … | |
[CODE] case IDC_Spam: { while(GetAsyncKeyState(VK_HOME)) { // Functions } break; } [/CODE] But it didnt work :O ![]() | |
Hey guys I'm new to C#.NET but I'm trying to create my own Form using my own GUI code. However I'm unsure which project I need when using Visual Studio 2008. A normal person would assume that selecting Windows Forms Application would be correct. However you'd be wrong it would … | |
I have to design and implement a new linked class called StudentList, to represent and manipulate the records of students enrolled in a course. The data field for each record in StudentList must contain: student name (string type) studentId (int) (from 0 to 10000) dept (string) major (string) In the … |
The End.