49,757 Topics

Member Avatar for
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
239
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
91
Member Avatar for raj1324
Member Avatar for Ancient Dragon
0
96
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
108
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
94
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
145
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
666
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
118
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
151
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
132
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
106
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
278
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
110
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
162
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
77
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
140
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
197
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
85
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
280
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
109
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
154
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
149
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
80
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
86
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
254
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

The End.