49,761 Topics

Member Avatar for
Member Avatar for timbomo

i have my questions commented in the program . i had to put most of program up so you could see what im doin. please help PROTYPES [CODE]void side_on_die(int& ns1,int& ns2,int& ns3, int& ns4, int& ns5, int& ns6); int roll_hold(int roll, int answer, int turn); int if_roll(); void if_hold();[/CODE] [CODE]int …

Member Avatar for timbomo
-1
117
Member Avatar for pinknblu

It's saying I have 6 errors. Need help, please..or a push into the right direction. Thank-you. :) [CODE]#include <iostream> #include <cctype> using namespace std; int Len_String(char *); int CountCapitals(char *); int CountVowels(char *); int main() { char msg[] = "Strayer - what a University !"; char msg2[] = "Programming is …

Member Avatar for pinknblu
0
137
Member Avatar for vivosmith

Hello I am glad to find this site. I have been searching for help with learning C++, to no avil. So my question, which is multi-fold: I have a book from 10 years back or so, ansi compliant, should it work with dev-cpp. Second, I learned the difference between char …

Member Avatar for vivosmith
0
566
Member Avatar for react05

how would i get the file below to display the number of moves by adding an output statement after the call to move() in main() to display the value of moveNumber, which will be the number of the last move. Thanks! [code] #include <iostream> #include <iomanip> #include "timer.h" using namespace …

Member Avatar for Fbody
0
252
Member Avatar for kut KK

hello guys... can you help me to find coding for grading system for my new assingment...( grade n grade point) grade A= 4.00 A- = 3.70 B+ = 3.50 B = 3.00 B- = 2.67 C+ =2.50 C = 2.00 C- = 1.67 D+ = 1.33 D = 1.00 E …

Member Avatar for MyrtleTurtle
0
229
Member Avatar for MyrtleTurtle

My assignment this week deals with using a struct. I think I can do that part. What I'm having trouble with is reading the file into each variable. The first item in the file is text with spaces. The next items are numeric and need to go into other variables, …

Member Avatar for MyrtleTurtle
0
122
Member Avatar for syd919

hello everyone I am teaching myself c++ and I was wondering if anyone could give me a site that has some c++ exercises particularly on 2d arrays and string manipulation. thank you.

Member Avatar for syd919
0
77
Member Avatar for MeetMak

Hi All, I have a C++ DLL, which has a function called INPUT and it is defined as follows in DLL: [code] extern "C" __declspec(dllexport) char* _cdecl INPUT(int a,int b,double D[2],double Z[2],double e,double f); __declspec(dllexport) char* _cdecl input_balr2(int a,int b, double *D,double *Z,double e,double f) { //Do Something } [/code] …

Member Avatar for MeetMak
0
962
Member Avatar for josolanes

Hi, I'm writing a "Date" class and it's fully functioning, including the output manipulators, but the issue I have is when creating a class the has a "Date" instance in it. It, then, doesn't compile because it says there are multiple definitions of the manipulator functions. I'll lay out, below, …

Member Avatar for josolanes
0
100
Member Avatar for mucoool

i'm having a problem in executing a batch file from my c++ code i've included all the necesary headers like dos.h,process.h,stdlib.h code: system(c:\new\ram.bat); there is no error in the program but the batch file does not get executed..... please help ................

Member Avatar for thomas_naveen
0
204
Member Avatar for gaya88

can we declare a array as, int arre[x]; and assign the value of x as,x=5; but error is coming "constant expression required." Any help? i wanted to input series of marks,first you should enter how many subjects(if 5 subs,x=5) then you can enter 5 marks.

Member Avatar for thomas_naveen
0
169
Member Avatar for ahmedyes

hi every one I really need help with this and how to do it =The motel has 12 rooms numbered 1 to 12, and each handles a maximum of 4 guests. Assume all rooms begin empty. Provide a user-friendly interactive menu that allows the following transactions: B – Book room(s) …

Member Avatar for thomas_naveen
0
164
Member Avatar for ilkeamasya

Our homework is to compare N circles with each other if they are intersecting or containing.My C file for that is : [CODE]int N=0 , i=0, j, a=0, max=0; float circle[MAX] [3] ; float durum1, durum2, durum3; float intersection[MAX], containment[MAX]; printf("Please enter the number of circles you want to compare …

Member Avatar for ilkeamasya
0
88
Member Avatar for mrnobody

Hi, I've got a modeless dialog. When user click the X button at top right hand corner, I want to catch the event and do some processing. What event do I use for that..? I cannot find OnClose event in the event handlers box. Btw, I'm using VC++ 6 (MFC). …

0
63
Member Avatar for timbomo

#include <iostream> #include <ctime> #include <cstdlib> using namespace std; i am having trouble putting functions in int main(). can someone show me how??? i want to put these function def. in int main() [CODE]int score_num(int& ns1,int& ns2,int& ns3, int& ns4, int& ns5, int& n6, char& gam_answ); int roll_hold(int roll, int …

Member Avatar for mattjbond
0
413
Member Avatar for jazzy_24

firstly here is the code i'm working on in visual studio [CODE]#include "stdafx.h" #include <iostream> #include <string> using namespace std; struct Car { string r_number,make_of_car,model_of_car; int mileage; int age_of_car; }; void main () { int i,num; Car *car1; cout << "Please enter the number of cars: "; cin >> num; …

Member Avatar for pinsickle
0
117
Member Avatar for PSP1202

Hey all I'm new C++ and am having a little trouble with a simple program. The program calculates the square root of a number the user inputs. When I input -1 or any negative it comes up as 1.#ind. Ideally when the user types -1 i want -1 to come …

Member Avatar for Banfa
0
289
Member Avatar for ratchy

So I have been asked to write a template class for a binary tree (easy) the hard part is that the nodes have to be written into a file and read in the same exact positions they were in when they were stored. I looked at the array solution with …

Member Avatar for ratchy
0
257
Member Avatar for some

Hello everyone, Currently, I am trying to make a smaller version of the famous Eliza bot. I have written a program that can understand and put out replies, but if I want to make it bigger then the code will be thousands and thousands of lines long. And all on …

Member Avatar for Banfa
0
196
Member Avatar for MTW1989

[CODE] #include <cstdlib> #include <iostream> #include <iomanip> #include <stdlib.h> #include <conio.h> #include <stdio.h> using namespace std; void printintromessage (); void getUserInput (char& Y); void calculations (const int& numofgamesinseries, const int& numofplayersonteam, int& i, int& j, int& k, int& l, char& Y); void PrintMax (const int& numofgamesinseries, const int& numofplayersonteam, int& …

Member Avatar for pinsickle
0
132
Member Avatar for DSalas91

Hi everyone. Im new in C++, actually im doing my first project, and i have a few questions, if you guys could help me it would be awesome. :) In a method i have to create a .txt file, It have a parameter indicating the number of the file. But …

Member Avatar for DSalas91
0
182
Member Avatar for mrnobody

Hi guys.. In my dialog, under void Class::DoDataExchange(CDataExchange* pDX), whenever i call DDX_Control(pDX, IDC_SOMETHING, m_VAR);, I got problem. After some digging, the problem is the function below. [CODE]HWND CDataExchange::PrepareCtrl(int nIDC) { ASSERT(nIDC != 0); ASSERT(nIDC != -1); // not allowed HWND hWndCtrl; m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); //<---- hWndCtrl = 0 if (hWndCtrl …

0
71
Member Avatar for osha

i want to make a key from keyboard toggle (on and off key ) that's for a polygon in openGl by using c++ this polygon appear when we press this key as solid and when we press this key again it appears wired can you help me thaxxxxx osha

0
31
Member Avatar for timbomo

can someone show me an example of how you would initiate a variable and how you would fix a undeclaired identifiers. i am a visual learner so thats why i ask for an example.

Member Avatar for Jiwe
0
131
Member Avatar for caffeine

I have a bunch of code that looks like: [CODE] // Local block scope { ostringstream ostr; ostr.fixed; ostr.precision(2); ostr.width(20); ostr << foo->bar[trno]; SafeArrayPut2D( retArray, 3, i, (void *) ostr.str().c_str() ); } { ostringstream ostr; ostr.fixed; ostr.precision(4); ostr.width(22); ostr << foo->foobar[trno]; SafeArrayPut2D( retArray, 4, i, (void *) ostr.str().c_str() ); } …

Member Avatar for dusktreader
0
175
Member Avatar for V0ldemort

How can I access (get) the individual pixels of the data in an LPDIRECT3DTEXTURE9? Thanks.

Member Avatar for dusktreader
0
75
Member Avatar for KBL

This program is to accept input from a user to select there own username and then a password which will be compared to the password KazzyB, and give an output saying Welcome, The only problem in it is a single error KB.cpp(18) : error C2447: missing function header (old-style formal …

Member Avatar for KBL
0
25K
Member Avatar for kinglaplace6422

I don't know where to begin: Lab 5 Write a program that will first fill two out of three parallel arrays (local to the main function) with user-supplied data and then give users the choice to query the parallel arrays. The first array is as follow: char title[SIZE_ROW][SIZE_COL]={"Intro to Calculus", …

Member Avatar for jonsca
0
233
Member Avatar for hazemahmed16

hello, i'm trying to install opencv 2.0 and use it in vs 2005, but i'm having some trouble compiling any piece of code that uses opencv including the examples installed with it. I searched all around and all i could find is instruction for installing previous opencv versions but not …

Member Avatar for hazemahmed16
0
92
Member Avatar for micke

Hey, I've been going through some directx tutorials, but for some reason I can't get my program to work with .fx files. It complains that the file cannot be found, even that it's in the same directory and I'm sure that I'm using it correctly.

Member Avatar for servicecycle09
1
138

The End.