51,593 Topics

Member Avatar for
Member Avatar for Moporho

I am trying to get my 2d array to total up values. It is laid out perfectly, but my values do not calculate. Is my math wrong? Please help?? [code] #include <iostream> using std::cout; using std::cin; using std::endl; #include <iomanip> using std::setw; int main() { const int DAY = 7; …

Member Avatar for Moporho
0
146
Member Avatar for WonderWomen204

Hey there. It's Erinn and I just have a quick question about my assignment that I am working on. I have everything right except for one part...don't u hate that...lol. Anyway, here is the code and assignment below. Sorry there is no code, but it's been a long day and …

Member Avatar for WonderWomen204
0
132
Member Avatar for Duanea2k
Member Avatar for laharven

[COLOR="red"]Hey guys, I have just convert my coding from vb to c++. However when i paste the codings inside another new project, it could be debugged but the designer view shows me error.[/COLOR] "C++ CodeDOM parser error: Internal Error Hide at Microsoft.VisualC.CppCodeParser.OnMethodPopulateStatements(Object sender, EventArgs e) at System.CodeDom.CodeMemberMethod.get_Statements() at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, …

Member Avatar for laharven
0
253
Member Avatar for mikky05v

create a program to produce a tableof cosines for given angles. Note that the program is to read an input file and write outputto an output file. You should prepare many input files and an input file that includes a negative number and a value between 90o and 180o among …

Member Avatar for Ancient Dragon
0
99
Member Avatar for cpp_noobsauce

Heres the problem: A scientist has been conducting experiments and recording results of those experiments. Two pieces of data per experiment have been recorded: temperature in degrees Celsius and a concentration ratio (in the range – 0.5 to 2.0). Validate user inputs. heres what I have: Part1 - Writing to …

Member Avatar for Ancient Dragon
0
117
Member Avatar for phalaris_trip

I would like to create a specialisation of.. template <typename CEnemy_Ty> class CEnemyManager {}; ..for a class called CTank which is a CEnemy But by defining.. template <> class CEnemyManager<CTank>{} ..it means I have to copy+paste huge chunks of unchanged code, just to change say one or two functions. By …

Member Avatar for phalaris_trip
0
102
Member Avatar for tm5054

[code] #include <string> #include <iostream> using namespace std; int main() { int loanAmount[10]; int numMonths[10]; string keepGoing; int counter = 0; do { cout << "Please enter a loan amount: "; cin >> loanAmount[counter]; cout << "Please enter the number of months: "; cin >> numMonths[counter]; counter++; cout << endl …

Member Avatar for Ancient Dragon
0
101
Member Avatar for max8888

[code=cplusplus] PROC bHook(LPSTR BaseLibraryName, LPSTR BaseFunctionName, PROC NewFunctionPointer, bool UnHook, PROC Custom) { PROC hBaseProc; return hBaseProc; } BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: OutputDebugString("--------Detour dll Load!"); bHook("KERNEL32.DLL", "CopyFileW", (PROC)MyCopyFileW, false, 0); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case …

Member Avatar for max8888
0
204
Member Avatar for BBustos

I'm having problems with my DisplayEntry function. What this program is supposed to do it display numbers that have been validated earlier in the program. The problem is it is displaying random numbers stored in the computer. I'm gonna include the struct declarations, the function call, and the actual function. …

Member Avatar for Ancient Dragon
0
122
Member Avatar for buddha527

Hello, I need help adding two arrays of different sizes [i.e. 3005 + 305 = 3310 ]. I am sorry but I do not have any code to post because I am completely lost on how to even go about starting this, so any hints or help on what to …

Member Avatar for vmanes
0
2K
Member Avatar for CodeBoy101

Hi I need an example of how threads are coded and implemented in Dev-C++, any help would be greatly appreciated. :)

Member Avatar for CodeBoy101
0
189
Member Avatar for Black Magic

Hey, I was just mucking around when using rand() and noticed every time it comes out as a output of 41? [CODE=C++]#include <iostream> using namespace std; int main() { unsigned int randomNumber; unsigned int guess; unsigned int guesses; randomNumber = rand(); cout << randomNumber << endl; system("PAUSE > nul"); }[/CODE] …

Member Avatar for Narue
0
138
Member Avatar for bschmitt78

Hello, I need to provide 2 overloaded constructors, each one displaying a date in a different format. Below is my class implementations, header file and main() function code snippets. The code is followed by the compilation error I get. I have tried a number of things, mainly changing the order …

Member Avatar for Ancient Dragon
0
198
Member Avatar for ar31an

Write a program that determines the day number (1 to 366) in a year for a date that is provided as input in the format dd-mm-yyyy. As an example, 01-01-2000 is day 1. 31-12-2001 is day 365. 31-12-2000 is day 366 because 2000 is the leap year. A year is …

Member Avatar for hammerhead
0
108
Member Avatar for Mark515

[code] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; static const int password = 1705898; int main() { int secondnumber; while(true); { cout << "Enter Password"; cin >> secondnumber; if (password = secondnumber) { cout << "Welcome Matthew"; } else { cout << "password Rejected"; } } system ("PAUSE"); …

Member Avatar for Ancient Dragon
0
106
Member Avatar for Kaushalya

Hi all, i'm getting following error messege when i use switch(temp.month) { //work fine with case 8: case 08: amonth=temp.day/30; temp.day%=30; temp.month+=amonth; break; default:break; } error:illegal digit '8' for base '8'. I can't understand why it is.could someone help me out asap.

Member Avatar for vmanes
0
86
Member Avatar for Mark515

[code=cplusplus] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; static const int password=1705898; int main; { int secondnumber; while(true) cout>>("Enter Password") cin<<(secondnumber) if(password = Enter Password) cout<<"Welcome Lukus"; else cout<<"Password Rejected"; system ("PAUSE") return 0; } [/code] i am getting the error C2447: '{' : missing function header (old-style …

Member Avatar for Ancient Dragon
0
236
Member Avatar for picass0

how can i pass argc and argv to other function? [CODE] int main(int argc, char *argv[]) { abc(wat should i put here to pass argc and argv?) } int abc(wat should i put in here also?) { process.... } [/CODE]

Member Avatar for Ancient Dragon
0
73
Member Avatar for Nemoticchigga

Does anybody know where I can get some basic source code on the creation and use of threads (I know about threads, just never coded them, and reading up on them, some of the inputs into CreateThread are confusing)?

Member Avatar for Nemoticchigga
0
106
Member Avatar for k2k

Can anyone point out what is wrong with this function? suppose I have a linklist which has already been populated with 100 nodes containing objects and linking from one to another. The object contain id, lastname, firstname... and I need to find a specific id and delete that node. (basically …

0
59
Member Avatar for Chiciuc_Maxim
Member Avatar for vijayan121
0
985
Member Avatar for knewc

Just some challenge code for ya, and some help for me on my independent study of C++ code a program that checks whether a string is a pseudo-palindrome.(a sentance that is spelled the same backwards/forwards. first code the following functions: char * remove_punct(char * str, char * remstr); char * …

Member Avatar for ithelp
0
162
Member Avatar for Black Magic

Hi, I've been reading "C++ In 21 Days", I read functions a while back and decided to write some, i wrote the code and it gave me a error, so i copied and pasted code from the book and still got a error, you must see from my point of …

Member Avatar for Black Magic
0
252
Member Avatar for amhadi

> Write a program that defines a class to keep track of student grades.The information the student class includes are the student’s first name, last name, a six-digit ID number, and a struct marks the struct marks contains five programming assignment scores, a midterm score, a final exam score, and …

Member Avatar for ithelp
0
145
Member Avatar for Adrian99420

Hi, I created 2 window form using visual C++, I am trying to display the string typed by user in second window form's textbox. Here is what i wrote, but the code is not working: Form1.h private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { tabPage1->Text=Form2().textBox1->Text; }

Member Avatar for mitrmkar
0
100
Member Avatar for Andy130

Hi everyone. i have a problem that's killing me here. (as everybody else...) this is friggin rediculouse though and i really need to understand what's up. i have a project due tomorow, and i got basically nopthing to turn in because it does not actually run... the problem is i …

Member Avatar for mitrmkar
0
122
Member Avatar for anifeelings

How is the working of member function different from friend function and a non member function? plz do tell me..

Member Avatar for Agni
0
66
Member Avatar for anifeelings

Write a program having a base class Student with data member rollno and member functions getnum() to input rollno and putnum() to display rollno.

Member Avatar for Nick Evan
0
67
Member Avatar for alexhkleung

i want to frd the[COLOR="Green"][B] MainControl[/B][/COLOR] with the derived class [COLOR="Green"][B]food [/B][/COLOR] [B][COLOR="Green"] objects.h (abstract base)[/COLOR][/B] [CODE=C++] #include "maincontrol.h" class objects {...}; [/CODE] [B] [COLOR="Green"]food.h (derived)[/COLOR][/B] [CODE=c++] #include "objects.h" using namespace std; class food: public objects {...}; [/CODE] [COLOR="Green"][B]maincontrol.h[/B][/COLOR] [CODE=c++] class objects; class food; class MainControl { public: friend objects; …

Member Avatar for alexhkleung
0
123
Member Avatar for anifeelings

Write a template class “binary_tree” in C++. The class should have functions for creation of the tree, insertion and deletion of an element, searching a key value in the tree, Post order traversal and output the value in ascending order. Make suitable assumptions, if any.

Member Avatar for Nick Evan
0
100
Member Avatar for Farisnet

Hi... I am a bit new to programming, and I'm trying to learn C++. I was wondering if there was a way to copy the contents of one variable into another... So that, for example: [ICODE] int x=5; int y; (Some fancy code here involving x and y); (y=5 but …

Member Avatar for dougy83
0
20K
Member Avatar for nurulshidanoni

what is the =' : left operand must be l-value means? error C2106: '=' : left operand must be l-value [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global …

Member Avatar for nurulshidanoni
0
437
Member Avatar for moltenice

Assignment - [url]http://condor.depaul.edu/~ntomuro/courses/262/assign/hw2.html[/url] [code]Write a class called Loan, which simulates the money you borrow from a financial institution, and a main function (i.e., an application program) which tests the class. You write ONE file, which should be named "myLoan.cpp". 1. Class Loan The class Loan should have the following members: …

Member Avatar for Agni
0
277
Member Avatar for Moporho

I am trying to solve a problem from a lab challenge. I can not get the program to compile correctly. Please look over and let me know where I need to be looking to solve this Use a two-dimensional array to solve the following problem. A company has four salespeople …

Member Avatar for Moporho
0
4K
Member Avatar for curagea

I have in my code two separate arrays to store values, uCurve and vCurve. Both are arrays of pointers to math vectors: [code=cplusplus]Curve uCurve, vCurve; uCurve[0] = &(bezcurveinterp(cP[0][0], cP[0][1], cP[0][2], cP[0][3], v).p); uCurve[1] = &(bezcurveinterp(cP[1][0], cP[1][1], cP[1][2], cP[1][3], v).p); uCurve[2] = &(bezcurveinterp(cP[2][0], cP[2][1], cP[2][2], cP[2][3], v).p); uCurve[3] = &(bezcurveinterp(cP[3][0], cP[3][1], …

0
53
Member Avatar for Arne Kristoffer

Hi! I have this function (well, it's pretty good explained in the code-tag, but okay.) which is supposed to see if a string is found first in a line in a text file. Anyway, this code gives the message (while running in debug mode in MSVC++): "Debug assertion failed. Expression: …

Member Avatar for Ancient Dragon
0
865
Member Avatar for Jennifer84

I opened the command promt inside VC++ and this solved it. I have encountered a problem. When I compiled a program it came up an Error Message and the VC++ 2008 Express Edition was closing. When open VC++ again and press on my project that I work with. This message …

Member Avatar for Colstel
0
625
Member Avatar for petzoldt01

It has been a long time since I have used C++ (I am only 20, so maybe not that long) I have been using several languages in the last couple years(Java, ActionScript2 and 3, PHP), polluting my mind with many different idioms, and now need to hop back to C++. …

Member Avatar for Ancient Dragon
0
153
Member Avatar for aquariusdragon2

So I know how to delete a descriptor from an array, but I can't seem to edit the code to add a new line to the data. The line consists of a name, one space, and then a 3 digit number. I was wondering if anyone could help me edit …

Member Avatar for Ancient Dragon
0
106
Member Avatar for cmoney12051

I am trying to firgure a way to store test scores to a arr or something so i can sotre 20 different scores and twenty different possible points values. but i cant seem to get it right i have almost everything done acept storeing the vales so i can recall …

Member Avatar for cmoney12051
0
97
Member Avatar for h0neydip

ok i have this program dealing with date Class. im having trouble with the overloaded operator % which returns a date with smallest component month, day, and year for two given dates. your help is very appreciated. For Example: d1 is May 5 , 1942 d2 is August 1, 1970 …

Member Avatar for Ancient Dragon
0
372
Member Avatar for black_adder

hello all im having trouble with entering data in arrays that are in a structure i was given a task to write the code for the following: 1) define structure tstudent that has the following info about students ---index number (int) ---name (char) ---age (int) 2) define structure tgrades that …

Member Avatar for Ancient Dragon
-2
92
Member Avatar for Spagett912

I'm solving a problem and am near completion but am having one little problem. I'm about to show the coding that i have but i need to make name, age, and weight value returning functions as well. You'll see what i mean. [code=cplusplus] int main() { Class secretType { Public …

Member Avatar for Ancient Dragon
0
89
Member Avatar for angleyz14

I need to write a program, that if anyone ever played memory when they were younger does exactly that, that asks a user for 8 numbers. the numbers the user inputs need to be scattered across a 4x4 array. for example if a user enters 4 there need to be …

Member Avatar for vmanes
0
80
Member Avatar for mikky05v

this is simulated data on daily vehicle traffic crossing a bridge for one week. From Monday through Sunday the daily vehicle counts were {986, 818, 638, 763, 992, 534, 683}. Create an input file named cars_data.dat containing these numbers. Write a program that will read these values from the input …

Member Avatar for hammerhead
0
150
Member Avatar for Raptoricus

Hi I have been programming for about 3 weeks now and am really starting to get somewhere with it, but I have encountered a problem with this text rpg that I am making, the problem is I have made 3 header files being 1.character(contains character class) 2. monster(another class file …

Member Avatar for Raptoricus
0
126
Member Avatar for Yellowdog428

for some reason I cannot add integers in an array of structures. here is the code. [CODE=c++]#include<iostream> #include<iomanip> using namespace std; const int SIZE = 5; struct playerInfo { char name[30]; //Players name int number; int points; }; int main() { int total = 0; // to hold total points …

Member Avatar for Ancient Dragon
0
87
Member Avatar for peachslasher

Hi, I've question regarding visiting and printing nodes for tree traversal. the main purpose of my program is to create tree for an arithmetic expression and then perform in-order and post-order traversal on the tree. The structure tree need to be hard-coded in the program using linked-list/pointer stored in one …

Member Avatar for Salem
0
152
Member Avatar for ra_rodri

hello all i wrote the a dll using vb 6.0 this dll only has this function: Public Function Impresion(ByVal Nombre As String) Printer.Orientation = vbPRORLandscape Printer.ScaleMode = vbInches Printer.Font = "Arial" Printer.CurrentX = 0.5 Printer.CurrentY = 1 Printer.Print Nombre MsgBox Nombre Printer.EndDoc DoEvents End Function the dlll works fine when …

0
68

The End.