51,593 Topics

Member Avatar for
Member Avatar for ferzan

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

Member Avatar for ferzan
0
145
Member Avatar for gregorynoob

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 …

Member Avatar for gregorynoob
0
189
Member Avatar for Clockowl

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 …

Member Avatar for Clockowl
0
173
Member Avatar for butt_usman

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 …

Member Avatar for Salem
0
168
Member Avatar for camthalion95

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.

Member Avatar for camthalion95
0
194
Member Avatar for jk_bscomp

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 …

Member Avatar for Salem
0
132
Member Avatar for lahom

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

Member Avatar for Duoas
0
124
Member Avatar for titaniumdecoy

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 …

Member Avatar for vijayan121
0
115
Member Avatar for yifli

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 …

Member Avatar for vijayan121
0
124
Member Avatar for nokeekon

I'm using Microsoft Visual C++ 2008. How would i play a sound file? Either .wav, .mp3, or .midi hopefully.

Member Avatar for CoolGamer48
0
838
Member Avatar for driplet

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 …

Member Avatar for MrGobroski
0
131
Member Avatar for lahom
Member Avatar for Duoas
0
174
Member Avatar for death_oclock

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

Member Avatar for death_oclock
0
192
Member Avatar for camthalion95

I want to make a bot for Counter-Strike called Counter-Bot. Does anyone want to help? A disassembler would be good, too.

Member Avatar for hacker9801
0
208
Member Avatar for akeem923

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

Member Avatar for mitrmkar
0
93
Member Avatar for TeCNoYoTTa

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 …

Member Avatar for Narue
0
770
Member Avatar for sabib

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 …

Member Avatar for zandiago
0
132
Member Avatar for nesalang

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

Member Avatar for hazmatt
-1
241
Member Avatar for titaniumdecoy

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

Member Avatar for sarehu
0
101
Member Avatar for lahom

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 …

Member Avatar for Duoas
0
209
Member Avatar for adamj2

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 …

Member Avatar for Ancient Dragon
0
164
Member Avatar for TeCNoYoTTa

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

Member Avatar for TeCNoYoTTa
0
84
Member Avatar for mrinmay

Write a c++ program to enter an initial date and final date and print the number of fridays(13th) in between the range.

Member Avatar for Salem
-1
109
Member Avatar for Spartan552

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

Member Avatar for Salem
0
165
Member Avatar for solaf_111

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

Member Avatar for mitrmkar
0
170
Member Avatar for Aamit

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??

Member Avatar for Aamit
0
41
Member Avatar for Prathvi

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.

Member Avatar for writem
0
73
Member Avatar for titaniumdecoy

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 …

Member Avatar for titaniumdecoy
1
124
Member Avatar for skatamatic

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 …

Member Avatar for VernonDozier
0
153
Member Avatar for solaf_111

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?

Member Avatar for Ancient Dragon
0
63
Member Avatar for all blacks

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 …

0
93
Member Avatar for LaurenceB

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 …

Member Avatar for hacker9801
0
181
Member Avatar for nokeekon

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

Member Avatar for nokeekon
0
255
Member Avatar for Jennifer84

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 …

Member Avatar for Jennifer84
0
129
Member Avatar for lily_86

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?

Member Avatar for nokeekon
0
111
Member Avatar for integer*09

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 …

Member Avatar for ninjaneer
0
146
Member Avatar for prab

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 …

Member Avatar for ninjaneer
0
611
Member Avatar for curiousa

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 …

Member Avatar for ninjaneer
0
158
Member Avatar for mikelle

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

Member Avatar for mitrmkar
0
260
Member Avatar for Jennifer84

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 …

Member Avatar for Jennifer84
0
91
Member Avatar for Evan M

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() …

Member Avatar for Evan M
0
609
Member Avatar for sidatra79

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

Member Avatar for Alex Edwards
-1
108
Member Avatar for amrith92

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

Member Avatar for mitrmkar
0
261
Member Avatar for maxiam

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 …

Member Avatar for maxiam
0
139
Member Avatar for himsymcpp

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 …

Member Avatar for Ancient Dragon
0
128
Member Avatar for Black Magic

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 …

Member Avatar for Narue
0
285
Member Avatar for Q8iEnG

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; } }; //####### …

Member Avatar for Q8iEnG
0
208
Member Avatar for FTProtocol

[CODE] case IDC_Spam: { while(GetAsyncKeyState(VK_HOME)) { // Functions } break; } [/CODE] But it didnt work :O

Member Avatar for jencas
0
59
Member Avatar for Acidburn

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 …

Member Avatar for vuyiswamb
0
190
Member Avatar for ac3this

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 …

Member Avatar for VernonDozier
0
151

The End.