51,593 Topics

Member Avatar for
Member Avatar for Ahmed Padela

Please help me to Write a program "to print the sum of the main and sub diagonal elements" Thanks all.

Member Avatar for Ahmed Padela
0
215
Member Avatar for JohnMG

Hello everyone, I'm just returning to C++ after a (very) long break. Ignore the form and purpose of this program, it's just an experiment to get me reacquainted with the language. I put my problem in the comments... thanks in advance. [code=c++]// Trying to get back into C++. // It …

Member Avatar for JohnMG
0
112
Member Avatar for blazted

I have trying to parse string data in a stack into a arithmetic equivalent. I implemented a stack and used strtok to parse it into tokens and placed them into my stack. Now I am trying to pull them off the stack and do the expression that is carrying them. …

Member Avatar for Lerner
0
97
Member Avatar for maidah

Hello I am the Handheld Product Manager for a software company in GA..... Looking for a thin telnet client to run on a DRDOS device (Symbol PDT 3110) that has total memory of 640kb, where OS shares this space…… Ideally would be great to find one that already exists… but …

0
60
Member Avatar for desijays

[code] class base { private: int i; void seti( int i_temp ) // :i(i_temp) ->Initializer List not working { i = i_temp; } public: base() { } base( int t ):seti( t ) { } }; [/code] error C2436: 'seti' : member function or nested class in constructor initializer list. …

Member Avatar for vijayan121
0
183
Member Avatar for Matt Tacular

Ok, so I'm making a program in c++ that keeps track of the number of objects you make for a specific class. It works, but I added a part to change the screen output at a specific number of objects and that's where it broke.... heres the program: [code]#include <iostream.h> …

Member Avatar for Matt Tacular
0
242
Member Avatar for jenymaru08

i dont know if this code is right because i'm trying to create a program that display the fibonacci value of a number with FUNCTIONS combining pass by the VALUE and pass by REFERENCE please i needyour helpfor my preparation for my exam [code]#include <iostream.h> void fibonacci(int, int&. int&); int …

Member Avatar for Ancient Dragon
0
94
Member Avatar for raj1324
Member Avatar for Ancient Dragon
0
98
Member Avatar for jenymaru08

i dont know if this code is right because i'm trying to create a program that display the fibonacci value of a number with FUNCTIONS combining pass by the VALUE and pass by REFERENCE [code]#include <iostream.h> void fibonacci(int, int&. int&); int main() { int num1=0, num2=1, num, fibo; cout<<"Enter number …

Member Avatar for thekashyap
0
92
Member Avatar for addicted

I need you to help with this.... I always get confused when a program that appears simple takes me long time to finish, and i always think that i am not up to the task... i always think that a good programmer is not suppose to take that much time …

Member Avatar for adotl
0
113
Member Avatar for radskate360

Hi all I had made a post a bit ago and had a few responces, they all really helped and I got past that part so wanted to just finish up and needed a bit more assistance so far I have everything i need outputing to the window with cout<< …

Member Avatar for Ancient Dragon
0
101
Member Avatar for laconstantine

Why both of the next examples are the same? Ex1 : int*(*foo)() = Function; Ex2: int*(*foo)() = &Function; Notice: In the second example i'm using & operator. That means that c++ takes function name as an address of it and this () dereferencing it just like in arrays?

Member Avatar for laconstantine
0
149
Member Avatar for radskate360

IF anyone can give me a little more assistance I would be very greatful. I am working on this program for my C++ class and here is how it goes. Directions. Write a program that calculates and prints the monthly paycheck for an employee. The net pay is calculated after …

Member Avatar for Narue
-1
671
Member Avatar for MarzenaM

I need to write program with five different functins. Teacher wants to input the names and exam marks for her students. She wants to determine symbol (A-F) she should assign to each. She wants to display the symbol as well as an appropriate message. Finally she would like to display …

Member Avatar for Gel
0
121
Member Avatar for m.s

Hi there, I'm a first time poster and first year C programming student. I am a little stuck on the following question: ----------------------------------------------------------------------------- "Conway's life is a special kind of game. It isn't really a game - just a spectator sport. It is played on a chess board, where each …

Member Avatar for m.s
0
199
Member Avatar for minigweek

Hi Everyone, Good day to you all. I am solving a problem : to Generate a Random Network. I hv divided the problem into two parts. First generate a Graph, then from the graph from a network. Here the code generates a random graph. User Gives n ->no. of nodes …

Member Avatar for minigweek
0
158
Member Avatar for squinx22

hi, Is it possible to hide the build process in makefiles during the compilation and only display the echoes set? for example: all: g++ -o foo foo.cpp @echo 'building...' If I type in make, the text display in the terminal would only be: building... How would I do this? Thanx …

Member Avatar for thekashyap
0
136
Member Avatar for rapperhuj

how can i RUn.. vmware if when i;m installing it,.. it says that: please run this program as super-user.. Execution aborted... :( plese help me...:(

Member Avatar for Salem
0
136
Member Avatar for Covinus

[code=c++] void CMod7aView::OnPaint() { CClientDC dc(this); if(hBmp!=NULL) { CBitmap bmp; bmp.Attach(hBmp); CDC bmDC; bmDC.CreateCompatibleDC(&dc); CBitmap *pOldbmp = bmDC.SelectObject(&bmp); BITMAP bi; bmp.GetBitmap(&bi); dc.BitBlt(0,0,bi.bmWidth,bi.bmHeight,&bmDC,0,0,SRCCOPY); bmDC.SelectObject(pOldbmp); } [/code] how do you make your image persistant? everytime iload a bitmap after I move the main window the image disappears. pls help me.

Member Avatar for Covinus
0
111
Member Avatar for radskate360

Our assignment is to write a program that calculates the volume of three geometric shapes, the program should ask for a shape and the three shapes we are to use is a dumbell, axle, spear. And he gives us the formulas for volume and how to find it. I know …

Member Avatar for iamthwee
0
283
Member Avatar for bcramer

Hi! I hope you could help me with this one. I simplified the code of my program to its basic problem, and the problem is that I do not seem to understand why this program does not release its memory. I check it at the moments of the [inlinecode]getline[/inlinecode]'s, using …

Member Avatar for Salem
0
113
Member Avatar for jan1024188

Hello I found a code on net, and I wanna use some parts of it in my program. But when I run Linker I get this: [CODE]1>Linking... 1>main.obj : error LNK2019: unresolved external symbol __imp__PlaySoundA@12 referenced in function "unsigned long __stdcall threadplaysnd(void *)" (?threadplaysnd@@YGKPAX@Z) 1>C:\Users\jan\Documents\Visual Studio 2005\Projects\avdiojan\Debug\avdiojan.exe : fatal error …

Member Avatar for jan1024188
0
163
Member Avatar for jerryseinfeld

I am using that but I only get some strange words :( I get my coordinates from x and y array..... what is the problem??? [code] for(a=1;a<i;a++){ yyy=(y[a-1]- y[a]); xxx=(x[a-1]- x[a]); slope[a-1]=yyy/xxx;} yyy=(y[i-1]- y[0]); xxx=(x[i-1]- x[0]); slope[i-1]=yyy/xxx; for(b=1;b<i;b++){ yyy=(slope[b-1]+slope[b]); xxx=(1-slope[b-1]*slope[b]); angle=yyy/xxx; res=acos(angle) * (180/3.14); printf("%d. Angle %f\n",b,res);} yyy=(slope[i-1]+slope[0]); xxx=(1-slope[i-1]*slope[0]); lastangle=yyy/xxx; …

Member Avatar for Salem
0
81
Member Avatar for applegrew

(I have 2 queries) I have made a html parser but the memory leaks, as it seems from the message below; is killing me. I am getting this message from gdb debugger (cygwin build). Heap block at 003D2CA0 modified at 003D2CB3 past requested size of b Also now not all …

Member Avatar for applegrew
1
1K
Member Avatar for Covinus

[code=c++] // MainFrm.cpp : implementation of the CMainFrame class // #include "stdafx.h" #include "mod7a.h" #include "MainFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif char file[MAX_PATH]=""; ///////////////////////////////////////////////////////////////////////////// // CMainFrame IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) //{{AFX_MSG_MAP(CMainFrame) ON_WM_CREATE() ON_COMMAND(ID_FILE_OPEN, OnFileOpen) ON_WM_PAINT() //}}AFX_MSG_MAP END_MESSAGE_MAP() static UINT indicators[] = { …

Member Avatar for Covinus
0
144
Member Avatar for Brent.tc

This may come off as a rather broad question, but I need to learn how to multitask in c++. I am developing a game, and to do so I need to learn how to program applications to run in realtime. (I want multiple characters to do things at the same …

Member Avatar for iMalc
0
202
Member Avatar for jerryseinfeld

hi again me .... I have a project about some stupid math calculations :)... NOw my question is how can user assign structure name??.. I mean in my program I ask from user some vertices and coordinates for polygons.. then I calculate lenght ,area.... kind of things... But I realize …

Member Avatar for linux
0
89
Member Avatar for Masood Ali

I am developing a C++ application which deals with socket programming. When I build my program, I get an error as follows, [code] ------ Build started: Project: AFEClientPublic, Configuration: Debug Win32 ------ Linking... LINK : fatal error LNK1104: cannot open file 'wsock32.lib' Build log was saved at "file://d:\AfeClientPublic43\AFEClientPublic43\Debug\BuildLog.htm" AFEClientPublic - …

Member Avatar for vijayan121
0
301
Member Avatar for tformed

The program I am writing displays the velocity and acceleration when the user inputs time. The code I have thusfar is: [CODE][COLOR=#008000] [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdio.h> [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<math.h> [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] main ([/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000])[/COLOR] { [COLOR=#0000ff]int[/COLOR][COLOR=#000000] time,velocity, acceleration;[/COLOR] printf ([COLOR=#800000]"Please input time in seconds: \n"[/COLOR]); scanf_s([COLOR=#800000]"%d"[/COLOR] , &time); velocity = 0.00001* pow(time,3)-.00488* pow (time,2)+.75795*time+181.3566; acceleration …

Member Avatar for Gel
0
114
Member Avatar for mikhailberis

Hi Everyone! I stumbled upon this forum through a Google ad. I can say it's very nice to see people gathering together and discussing stuff about IT. I'm a 23 year old software developer working at [URL="http://friendster.com"]Friendster, Inc.[/URL] -- I am also a partner in one of the consulting firms …

Member Avatar for eXceed69
1
155
Member Avatar for hitman31
Member Avatar for lotsofsloths

OK, I am trying to make a Lottery game in Microsoft Visual C++ 2005 Express Edition with windows application format that randomizes 6 numbers, 1-40. I've made the # randomizer, but i cannot get the number to show up on a textBox. Here is the code that is "bad". [code] …

Member Avatar for lotsofsloths
0
154
Member Avatar for omegajam

I need some help to build the simple code (LAB exercise): The “main” of the C++ program attached to this assignment expects a class called “item.” This class must have methods for “enter” and for “print.” Below is a description of what each method should do: item.enter() should allow the …

Member Avatar for squinx22
0
84
Member Avatar for kylcrow

Hey guys, I need to write a struct that measures the distance from a point (x,y,z) to the origin. I am good on how to write it as a struct, I just don't know the formula for the distance. Can someone help me out? Also, the formula for a dot …

Member Avatar for kylcrow
0
89
Member Avatar for quintoncoert

I am using VC++ express 2005 and I have a dll and two header files. The one header file inherrits from the other and the dll contains the source code. Can someone please tell me where do I write the include commands for these header files? I can create and …

Member Avatar for Ancient Dragon
0
308
Member Avatar for nkhosinathie

hello everyone. i'm developing a program containing a for loop where the answer of each each respondent to each questrion is read in. the program is saying:100 people conmpleted the following questionaire: what is your highest qualification? 1.if grade 10 1.if grade 12 3. if any tertiary qualification how old …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for sInFuL69er

Hello everyone, i've gone blank atm and i cant think i have a class [code] class Client { public: int aa; int bb; }; [/code] different file [code] class agent { private: vector<Client> clientRequest; public: void getClient(); }; [/code] and i get information from a file [code] infile >> C.aa; …

Member Avatar for vijayan121
0
107
Member Avatar for jenymaru08

how to make a program which the out put is: enter n=5 [code] 1 2 3 4 5 4 3 2 1 2 3 4 5 4 3 2 3 4 5 4 3 4 5 4 5 [/code] this is the code i use but an error occur [code=c] …

Member Avatar for meiyantao
0
181
Member Avatar for afflictedd2

Hi, I'm wondering how to give a map a fixed size like you can give an array a fixed size by just "byte data[SIZE*DATASIZE]".. or if it's possible anybody know.. struct Table { map<int, int> table; // }; struct Table *flightChart; The reason I have to give this a fixed …

Member Avatar for vijayan121
0
119
Member Avatar for jaepi

hello, there... how would you send a signal to end this loop [code] string s; int counter; while(cin >> s){ counter++; } [/code] thanks...

Member Avatar for jaepi
0
51
Member Avatar for adolif

HI, I JUST started C++ today, and I'm used to programming with Game Maker. With Game Maker, it comes with a "dictionary" of ALL the functions, constants, and variables that are pre-defined. I just downloaded a c++ compiler but it comes with NO references and I've been googling very badly. …

Member Avatar for John A
0
114
Member Avatar for machine

Hi i have to use linked lists to get information from the user and dispaly it. I am having trouble with displaying the linked list. If you look at my second function where i am trying to list the information, you might be able to tell what the problem is? …

Member Avatar for John A
0
242
Member Avatar for fatnickc

I'm in the middle of writing a C++ program which will eventually sort data, using a tree. I would like to swap a child with its parent if the child's value (could be anything, using a template) is less than the parent's. however, I have become stuck when trying to …

Member Avatar for fatnickc
0
241
Member Avatar for muzammilpn

Can any one help me in providing help I am working on Tree Structure My problem is to take input as an expression like a+b(c/t) and Using Binary Tree converting it into postfix RPN ab+ct/

Member Avatar for iamthwee
0
140
Member Avatar for rashmi43

Without changing the main function modify the following code so that the o/p is [B]Initialize[/B] [B]Hello world[/B] [B]clean up[/B] [code=c++] #include<stdio.h> #include<iostream.h> #include<conio.h> void main() { cout<<"Hello world"; }[/code]

Member Avatar for Narue
0
91
Member Avatar for addlebrains

I keep getting this message during compiling. There are no strings or open " marks around. In fact, even if I move the lines around, the error remains pointing to the same line.

Member Avatar for WolfPack
0
152
Member Avatar for louis7370

[code=cplusplus] #include<iostream.h> #include<fstream.h> #include<cstdio> #include<typeinfo> #include<cstring> #include<sstream> #include<algorithm> #include<ctime> char* itoa(int n, char *buf,int) // { // ostring out; // out<<n; // strcpy(buf,out.str(),c_str(); // return buf; // } class string class const struct Node class VCDdetails { private: char vcdid[6]; char movietitle[50]; char castofmovie[50]; int numvcdcopy; public: void addVCDdetails() { …

Member Avatar for iamthwee
0
108
Member Avatar for emg70

pls help just started learning c++ and cant get my head around how to do this: write prog for data logger which records one reading per day at a specific time for 5 days.the logger records in the format:n1805071500 the first letter preceding the numbers can mean one of below …

Member Avatar for iamthwee
0
122
Member Avatar for Zay

Hi; need your help , now i want a hint for this question to know how to solve it : [code] template <class T> void sortqueu(queueType <T> & q); [/code] this function is to sort all elements of that queue . using queue operation only (it is not a member …

Member Avatar for Narue
0
1K
Member Avatar for Covinus

[code] hBitmap = LoadBitmap(NULL, saFileName); [/code] ho come i cant load any bitmap using this function? hBItmap is always null

Member Avatar for Covinus
0
234

The End.