49,761 Topics

Member Avatar for
Member Avatar for balgarath

I just started messing around with classes and have been trying to figure out this error for an hour or so. Here is the compiler error: [code] g++ player.cpp tictactoe.cpp TicTacToe.h:15: error: expected constructor, destructor, or type conversion before ';' token player.cpp:26: error: 'TicTacToe' has not been declared player.cpp: In …

Member Avatar for Salem
0
153
Member Avatar for mozira

Hello everyone,I am Mozira and live in South Africa.I am currently doing visual C++ for the first time using Borland C++ builder.So i would gladly appreciate it if you could help and guide me with tutorials about visual C++.hope to hear from you soon

Member Avatar for Salem
0
169
Member Avatar for pedz

If NOT_WORKING is defined, the following program gives me linker errors: /usr/bin/ld: Undefined symbols: Definer<int, 1>::d Definer<int, 2>::d Definer<int, 3>::d Definer<int, 4>::d collect2: ld returned 1 exit status But if NOT_WORKING is not defined it compiles and runs. I can't figure out: 1) Why those things are not getting instanciated. …

Member Avatar for pedz
0
105
Member Avatar for mattyd

Hello: I am seeking a few tips in regards to debugging: I have been using [B]Visual C++ 2005 Express Edition[/B] for the last few months but am not very comfortable with its debugging platform. I simply wish to step through a section of the program via breakpoints and view variable …

Member Avatar for JoBe
0
90
Member Avatar for jennifer911

Hi, I need to write a counter code to count the number of spikes in the TTL logic input signal... What should I take as an input... Can i write it normally by putting the count in an infinite loop like while(1) // increment count exit(1) something like this... or …

Member Avatar for Nick Evan
0
300
Member Avatar for cblue

i'm trying to write a program that takes two numbers from the user prints out the sequence between the 2 numbers and then outputs wthe longest sequence for example if the user inputed 8 and 10 it should out put 8 4 2 1 9 28 14 7 22 11 …

Member Avatar for WolfPack
0
793
Member Avatar for pedz

The [] operator must be a non-static member function. I have been able to write a class and overload the [] operator. But in my weird case, I would like to have an array of elements:[CODE]MyClass elements[6];[/CODE]But I don't actually want element access[CODE]element[2][/CODE]to use regular pointer arithmetic; rather I'd like …

Member Avatar for pedz
0
197
Member Avatar for mattyd

Hello: I am having a bit of problem with logic in a segment (marked in [B][COLOR="Blue"]blue[/COLOR][/B]) of this code: the indicated code should simply update the variable upon each pass of the function as it runs; the variable value maxes out at 456-- it will not increase by 228 beyond …

Member Avatar for mattyd
0
141
Member Avatar for n.aggel

hi, sorry if this is a stupid question, i am a total newbie:) i want to dynamically allocate an object to a pointer and i write: [code=c++] class_test *ptr = new class_test(); [/code] [code=c++] class_test *ptr = new class_test; [/code] both of them compile:confused:....are they the same thing{meaning that the …

Member Avatar for ~s.o.s~
0
198
Member Avatar for n.aggel

Hi, i would like to separate the declaration of a class from the definition. i know about the [code] void aclass::a_method(){ ..... } [/code] but i dont know anything about what should be written in the header file, and how can i use it through main....:confused: sorry if am not …

Member Avatar for Ancient Dragon
0
146
Member Avatar for balekic

Hello all, I am writing a Breakout type game in C++ and I've come across a problem. I've drawn the bricks, bat, and a ball to the screen as well as programmed the movement of the bat and ball, however, collision detection is kicking my butt. I've looked up sample …

Member Avatar for ~s.o.s~
0
131
Member Avatar for webspy

I have the following script of a dialog box: [code] #include "Resources.h" IDD_MAIN DIALOGEX 0,0,500,300 FONT 8,"Tahoma",400,0 STYLE WS_CAPTION|WS_VISIBLE|WS_SYSMENU|WS_GROUP|DS_CENTER EXSTYLE WS_EX_APPWINDOW BEGIN // controls END [/code] [code] ... hDlgMain = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_MAIN), hWndMain, MainDlgProc, (LPARAM)&MyData); ... [/code] The dialog box itself works great, the problem is that it's not propely …

Member Avatar for Ancient Dragon
0
315
Member Avatar for aidi.morini

[COLOR=#808080]Hi, [/COLOR] [COLOR=#808080]I’ve written a Windows application in Visual Studio .NET using C++. The main window of my application is a dialog window. I need to display a Save File Dialog window when one of the buttons on my main window is clicked. But my main window is a dialog …

Member Avatar for Ancient Dragon
0
145
Member Avatar for edek

I need to check what hardware is installed in the computer using C++. Especially I need to check what graphic card, CPU and HDD is present in the machine of user of my program. Thanks in advance Edek

Member Avatar for Ancient Dragon
0
84
Member Avatar for Shiva_nan

Hi , I am developing Library Management Software using Win32 C language. I am using [COLOR=green]Dev c++ 5.0[/COLOR] compiler.. I have to display the Book details in the DataGrid.. I dont know how to add [COLOR=red]Data Grid Control[/COLOR] to Form.. i have searched in lot in the net, but couldnt. …

Member Avatar for Ancient Dragon
0
100
Member Avatar for Francis Waldron

ask Using two integers num1 and mun2 divide the first by the second print out guotient and remainder both ints output looks like this First number entered second number entered Quotient Remainder

Member Avatar for Francis Waldron
0
313
Member Avatar for Shiva_nan

Hi, I am working with Win32 programming in C language.. I am using Dev C++ compiler 5.0 .. I had created the tab control in the form with the following coding. [COLOR="Red"]g_hwndTabCntrl = CreateWindowEx(0, //more or 'extended' styles WC_TABCONTROL, //the 'class' of window to create NULL, //the window title WS_CHILD|WS_VISIBLE| …

Member Avatar for Shiva_nan
0
285
Member Avatar for dabobrow

I have a C++ program that reads from an infile, determines by a char if the line should be Deleted or Added. From there the program uses pointers to insert data into a sorted list. The issue I am having is printing the data out properly If you notice, I …

Member Avatar for dabobrow
0
186
Member Avatar for n.aggel

if i write something like this it works: [code=c++] Person array_persons[10]; int age=0; for(int i=0; i<10; i++) { cout<<"give age : "<<i<<endl; cin>>age; array_persons[i].setAge(age); } [/code] but when i try to do it with pointers: [code=c++] Person *array_persons[10]; int age=0; for(int i=0; i<10; i++) { cout<<"- give age : "<<i<<endl; …

Member Avatar for ~s.o.s~
0
91
Member Avatar for nanodano

I have a question and I was hoping someone could point me in the right direction. I know the IP address of a server I want to download a file from, and I know the path on the client hard disk I want to download it to. How could I …

Member Avatar for ~s.o.s~
0
93
Member Avatar for phuduz

hey guys heres a pop machine program ive been working on and i juss cant seem to understand why im gettin errors especially some of the semi colon errors any help would be much appreciated ty in advance [code] [COLOR=#008000]//File: Assignment 3[/COLOR] [COLOR=#008000]//Programmer: Ravi Mandair CPSC 1103 S. 10[/COLOR] [COLOR=#008000]//Purpose: …

Member Avatar for WaltP
0
79
Member Avatar for linq

I am a new learner to the Dao database operation through MFC access.For now I am trying to write a program, saving two values in two edit boxes to a column of MS Access 2000 table. There are not many samples available. Could any one write little sample codes or …

Member Avatar for Ancient Dragon
0
90
Member Avatar for mattyd

I have come to point in my program where I have decided a static variable would be the best option. I am not very familiar with static variable use and have never implemented them often. The area of concern is highlighted in [COLOR=Red]red[/COLOR]: I am simply using a time function: …

Member Avatar for mattyd
0
108
Member Avatar for smallpau1

I am having trouble, i am trying to make a program read in 3 points and calculate the 3 things listed in the program, but i cant seem to get the sideA-C to get calculated out without overloading the sqrt function. The functions given above main have to be used …

Member Avatar for smallpau1
0
222
Member Avatar for pedz

I'm trying to understand Argument Dependent Lookup. The classic example is: [CODE]namespace NS { class T { }; void f(T); } NS::T parm; int main() { f(parm); // OK: calls NS::f }[/CODE] I'm looking at this [URL="http://www.kuzbass.ru:8086/docs/isocpp/basic.html#basic.lookup.koenig"]page[/URL] and in particular this statement: [QUOTE]If T is a class type, its associated …

Member Avatar for Lerner
0
112
Member Avatar for mattyd

I have been looking at a small bit of code concerning the use of [B]static [/B]with variables; I thought I understood the use of [B]static[/B], but I find this code confusing: [code]//: C03:Static.cpp // Using a static variable in a function #include <iostream> using namespace std; void func() { static …

Member Avatar for Salem
0
148
Member Avatar for bhagwat_maimt

hi everybody! I am trap in a problem related to structure. I am working in the project in which I am devleoping a DLL in C++ using VC++ editor. The code I am using is as follow: [code=c++] //This is header file typedef struct{ static char szOriginalAddress[0x100]; static char szRecipientAddress[0x100]; …

Member Avatar for WolfPack
0
121
Member Avatar for wheelz

I need some help,Here is the problem, I work for a company that lays ceramic floor tile and I need a program that estimates the number of boxes of tile for a job. A job is estimated by taking the dimensions of each room in feet and inches, and converting …

Member Avatar for wheelz
0
182
Member Avatar for mattyd

I am incorporating clock_t into a current build; I need a simple way to measure time elapsed; it is not so important the source of elapsed (CPU) time or even its starting point (zero would be ideal, but it should not matter). I really just wish to understand the output …

Member Avatar for WaltP
0
226
Member Avatar for shappell

I am trying to compile the following code. I keep getting thefollowing linker errors. I am getting about 28n of these errors all having the linker at the begining [Linker error] undefined reference to `SQLGetDiagField@28' [Linker error] undefined reference to `SQLGetDiagRec@32' [code=c] #include <stdio.h> #include <windows.h> #include <sql.h> #include <sqlext.h> …

Member Avatar for ~s.o.s~
0
282

The End.