49,756 Topics

Member Avatar for
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
790
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
184
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
130
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
195
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
128
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
307
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
144
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
82
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
309
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
275
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
84
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
92
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
89
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
107
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
220
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
111
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
181
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
218
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
281
Member Avatar for JoBe

Hello ladies and gents, Wanted to ask if someone could help me out with the debug settings in VC++ 2005. What I want to be able to do is to follow my program step by step and see what happens with the variables. I know it's related to the settings …

Member Avatar for Ancient Dragon
0
279
Member Avatar for linq

string strd1 = "9"; int m=atoi(strd); Got the error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' how to change the second line to make it work?

Member Avatar for Salem
0
130
Member Avatar for kamleshpdude

Hi, I want to write a program in perl which will pass function parameters to a C++ .exe file and run the exe file with these parameters

Member Avatar for MattEvans
0
91
Member Avatar for JRM

Hello, I've put up some posts about the programming tools that I am currently using. So far, no takers. This makes me wonder what people who know what they're doing are using! M$'s IDE seemed overly complex for my modest needs. Besides, I have no use for the DLL and …

Member Avatar for nanodano
0
142
Member Avatar for linq

how to solve this error: error C2664: 'strcpy' : cannot convert parameter 1 from 'class CString' to 'char *' when I am using strcpy(StdGrades.StudentName, this->m_StudentName); StdGrades is a struct, StudentName is a CString type, m_StudentName is a CString variable. Actually it is from: [URL]http://www.functionx.com/visualc/fileprocessing/cppserialization.htm[/URL] there is only one error

Member Avatar for Ancient Dragon
0
97

The End.