49,761 Topics
| |
Hey guys i am having a small problem with this calculation in bold: **amtwon = (pow(pbet,2) / pow(pbet,2-100 *pbet))** ; amtlost = ( 0.35 * pbet); totalwin = (amtwon - amtlost); this is the block of code.the problem is **amtwon** totalwin is supposed to return a value of 23.993.18 but … | |
Hello, everyone! I just have a simple question, I think. I have created three unique classes, and each of these classes use some of the others as member variables. However, because of the way the code is organized, I often receive the error "CLASSNAME is not declared" when trying to … | |
Hello all, I am trying to create a program which keeps track of football stats for individual players. The program is setup to read a list of players names, numbers, and positions from a .txt file and then put them into a strctured array, print them to the screen, and … | |
I have a program created in dev-C++. It works find and no errors but when I transfer to microsoft visual C++ express edition I got this error. "No such file or directory found for "windows.h". In dev-C++, I can found windows.h in C:\Dev-Cpp\include but not in Microsoft VC++. Whats the … | |
Can somebody tell me how to override a function by using the scope resolution operator ( :: )? | |
Would anyone know if there is a specific directory for any IDE, in this case I'm using DevC++ on Windows XP and have a button widget from WXWidgets which can contain a Bitmap Image (wxBitmapButton). I can't understand the documentation surrounding this control but all I want to do is … | |
Please help me. making a syntaxes for any game for our final project. thanks | |
#include<iostream> using namespace std; #include<iostream> using namespace std; void main() { int a ,b,c; cout<< "Enter three integers"<<endl; cin>>a,b,c; if (a<b && a<c) cout<<"a is less"<<endl; if (b<c && b<a) cout<<("b is less"); if (c<a && c<b) cout<<"c is less"<<endl; else cout<<"all numbers are the same"<<endl; }; I GET A … | |
Have a question , if we can compare two arrays for equality like this #include <iostream> using namespace std; int main() { int a[5],b[5]; for (int i=0;i<5;i++) { cin>>a[i]; cin>>b[i]; } if (a==b) cout<<"they are equal"; } as you see isnt there a way like this or a function to … | |
So, i wanna try graphics, and i was wondering if sfml or sdl is better? I cant find any good tutorials on sfml and its kinda confusing. i havent used sdl so im asking your opinion. and also, **What did you start off with, and why?** | |
Hey guys I'm having a minor issue here, I'm having an issue with my sterling.cpp in the add functions sterling add(sterling s1, sterling s2) my question is how do I get it to realize when my shillings is > 20 to goto pounds and when my pence is > 12 … | |
I coudnot process video files in OpenCV 2.1. I hav OS x86 windows 7,Used visual studio 2010. When i first run a simple grab a frame from a video file (.avi) some missing dlls(msvcr90d.dll) error happened. Then I installed Visual Studio 2008 express. Then an another error happens R6034 , … | |
i want to display data from text file in list view and in tree view root will be file name, but i dont know how to do it, the problem is with displaying text file data in list view, i don't know anything about that. text file data is very … | |
Write a function, swapSubtrees, that swaps all of the left and right subtrees of a binary tree. Add this function to the class binaryTreeType and create a program to test this function. This was my assignment this week and I am just at a loss I don't even know where … | |
I am converting an app I wrote when learning VB (I primarily use C++). In VB it was trivial to minimize a window to the Taskbar: Private Sub GoButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GoButton.Click Me.WindowState = FormWindowState.Minimized Setting the window state in the "Go" button's _Click … | |
Im training for olaympiad and need a little of your help to know useful functions that You use . one of an important things I need , Is that to take a number base 10 to base 2 for example : 66 (base 10) , 1000010 (base 2) if available … | |
Basically the program is a database of student enrollments. I cannot get the the search delete/undelete and update functions to work and need help asap. Need to implement a bool field to the delete / undelete Please help #include <cstdlib> #include <iostream> #include <iomanip> #include <conio.h> #include <fstream> using namespace … | |
Determinate,if it's possible,p numbers of n binary digits,so any 2 of this numbers to match in exactly m positions.There must no be positions same digit to appear in all the p numbers. Restrictions 1 <= p <= 25 1 <= n <= 25 1 <= m <= n a number … | |
A retail company must file a monthly sales tax report listing the sales for the month and the amount of sales tax collected. Write a program that asks for the month, the year, and the total amount collected at the cash register (that is, product sales plus sales tax). The … | |
Hi all. This regards chapter 6 of "Accelerated C++". The program is intended to scan a document and find all the urls in it. I am testing it with just one string input "text http://www.page.com more text". The program is compiling but doesn't run beyond me entering the input. I … | |
Hi, I'm new to C++. plzz help me with this error. #include <cstdlib> #include <iostream> #define clauselength 85 //we will use index number to find out the clause number. //there are 88 clauses. as we start using index from 1 we have to add one to 89. using namespace std; … | |
can anyone help me,, i have some iteration that value from iteration store to 'List', the problem how to list of value from iteration and output as text file each line,, need your help.. thanks | |
How can we know the name of the stream to which output is being redirected through a C++ program? For example, I have a program 1.cpp whose output is being redirected to a file a.txt i.e., a.out > a.txt Now, I want to know the name of the file to … | |
Hi friends i had a assignment to make this c++ program output f e d c b a e d c b a d c b a c b a b a a i have created this program using this code # include <iostream.h> # include <conio.h> void main(void) { … | |
I am trying to work on an assignment that allows you to create an entry for a phone book, but there are a few things confusing me: #include <string> #include <iostream> #include "entry.h" using namespace std; entry::entry() { p_fname = ""; p_lname = ""; p_phone = ""; } entry::entry(std::string fname, … | |
Hello! Can someone please give me some advice where to begin this program from and how. Thanks in advance. [quote]Given set of points in the plane, you have to write a program in C++ that computes the following values: 1. The minimum distance between two points. 2. The maximum distance … | |
| I'm stuck with this one. I need help drawing a tree in C++. Weird right? I've posted the parameters below and my response has my code so far. Write a program that draws a pine tree of a specified height How tall should the tree be?: 6 1. Prompt the … |
**Hello C++/C Programmers there,** Please help with my program in C++, my program is always have 2 errors every time I compile and run it. My program is about string permutation which has main menu first. Here is my codes: #include<iostream.h> #include<conio.h> #include<stdio.h> int count=0; void permut(char stra1[],char append[]) { … | |
kindly help me n tell me in 2 dimension array wen we r taking words as input then cin would be used or getch..???plz replay.me waiting | |
My program wont compile because of this one function, can someone explain to me why it is says "forbids comparison between pointer and integer" Any help would be appreciated void ReadBitPattern (ifstream& infile) { int x; x = cin.get(); if(cin.get() == "0") { for (int index = 0; index < … |
The End.