49,761 Topics

Member Avatar for
Member Avatar for solomon grundy

I need to Construct a program that inputs the entries of two matrices and multiplies them. Construct the program so that it gives an error message if they cannot be multiplied. What I have done so far I need to Construct a program that inputs the entries of two matrices …

Member Avatar for WaltP
0
105
Member Avatar for solomon grundy

Is this code compiling [code] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <iostream>[/COLOR] [COLOR=#0000ff]using[/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#008000]//Define the Matrix3X3 type.[/COLOR] [COLOR=#0000ff]typedef[/COLOR][COLOR=#0000ff]struct[/COLOR] { [COLOR=#0000ff]float[/COLOR] index[3][3]; } Matrix3X3; [COLOR=#008000]//Function prototypes (functions are defined below main())[/COLOR] [COLOR=#0000ff]void[/COLOR][COLOR=#000000] printMatrix( Matrix3X3 a );[/COLOR] Matrix3X3 inputMatrix(); Matrix3X3 addMatrices( Matrix3X3 a, Matrix3X3 b ); Matrix3X3 subtractMatrices( Matrix3X3 a, Matrix3X3 b ); Matrix3X3 scalarMultiply( Matrix3X3 …

Member Avatar for Nick Evan
0
87
Member Avatar for nicolivolkov

Hi all, I looking for somebody to help me through a final class program. I would be happy to pay somebody to tutor me through this or make a donation. I am not looking for somebody to just give me the answer, but I DEFINITELY need help. It is due …

Member Avatar for nicolivolkov
0
401
Member Avatar for andrax

I'm writing a win32 app that re-paints the client area everytime the user clicks inside of it. Unfortunately after about 25 or 26 clicks the window gets painted white, but the black grid lines still appear. The WM_PAINT case goes through a for loop and asks another class what should …

Member Avatar for andrax
0
217
Member Avatar for newbie2c++

Hi everyone! I am having some difficulty with my code here. I wrote a prgraom that is supposed to receive a non-determined number of fields from an HTML form and return their values back to a browser. I feel like I am almost finished but when I open up the …

Member Avatar for John A
0
85
Member Avatar for newbie2c++

I am trying to finish up this program but it wont compile. I am getting some error messages but don't understand them. Can anyone take a look at my program and see if you can find anything wrong with it? THank you so much in advance this is my final …

Member Avatar for Ancient Dragon
0
123
Member Avatar for Sandtimes

[COLOR=#555555]I am suppose to be creating a program that uses a structure named Moviedata to store the following information about the movie: Title, Director, Year Released, running Time (in minutes).[/COLOR] [COLOR=#555555]The program should create two moviedata variables, store values in their members, and pass each one in turn to a …

Member Avatar for Sandtimes
0
639
Member Avatar for milky

im new with c++ and my lecturer given this question and ask me to solve it. it is difficult to understand it. anyone can help me,pls? [COLOR=#000000]Given the structure[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]typedef struct {[/COLOR] [COLOR=#000000] char Firstname[20];[/COLOR] [COLOR=#000000]char Lastname [20];[/COLOR] [COLOR=#000000]char add[20];[/COLOR] [COLOR=#000000]char city[20];[/COLOR] [COLOR=#000000]char state[20];[/COLOR] [COLOR=#000000]char zip[6];[/COLOR] [COLOR=#000000]char phone[15];[/COLOR] …

Member Avatar for Infarction
0
123
Member Avatar for pagantom

I'm lost. why won't my objects instantate? Here's the code, compiler errors are below. thanks [code=cplusplus] class date { private: char *mo; int day, yr; public: date() {*mo = 0; day = 0; yr = 0;} date (char *m, int d, int y) {mo = new char[strlen(m)+1]; strcpy(mo, m); day …

Member Avatar for ~s.o.s~
0
128
Member Avatar for tech291083

hi, i m running fedora core 5 32 bit as the os and want to learn a bit of c++ programming. did the search on the net and came across a post telling the fact that something called eclipse can be used to write c++ code and compile it perfectly. …

Member Avatar for ~s.o.s~
0
125
Member Avatar for vicky_dev

Can you write a program that prints its own source code ( in C/C++ )? Of course it would be easy to do that referring to the source file, but how can this program be written assuming that the souce file is not available at run time? :?: :?:

Member Avatar for SpS
0
304
Member Avatar for ambitious

Hi all, I am trying to build extension modules in Visual Studio.NET 2003. I get the following link errors in debug mode, but there are no errors in release mode. _viscoelastic error LNK2019: unresolved external symbol __imp__Py_FindMethod@12 referenced in function _veModelGlobalRayleigh_getattr@8 _viscoelastic error LNK2019: unresolved external symbol __imp__Py_InitModule4@20 referenced in …

Member Avatar for Mohfeza
0
359
Member Avatar for jethroalias97

hi, i'm trying to execute some c++ code from the php script in my webpage, but its not working. the best i could find was the php code below. [code=php] $output = shell_exec('ls -lart program.exe'); echo "<pre>$output</pre>"; [/code] here is the code of program.exe (codewarrior created program.exe from this code) …

Member Avatar for Puckdropper
0
100
Member Avatar for DynamitMsk

Hello, I'm working o a function that takes a file with binary numbers and returns the sum of those numbers. Here's where I'm now [code] int Sum (char *fileName) { char * numEnd; long temp(0); int result(0); string line; ifstream file (fileName); if (file.is_open()) { while (! file.eof() ) { …

Member Avatar for John A
0
107
Member Avatar for backstabber

this program compiles and gives the following return state/code Exit code: -1073741819 this is very irritating i would also ask please do not post the output file here this is a challenge from arcanum i just want a working program. please help me with this program. this is what i …

Member Avatar for backstabber
0
113
Member Avatar for GuruGhulab

Hello there, my question is , i read upto 20 numbers from a file, then i have to sort them into, negatives, odd's and even's, then i have to display total negatives, odd's, and even's, i also have to display all the acutal values of the negatives, odd's, and even's. …

Member Avatar for GuruGhulab
0
133
Member Avatar for the_master

Hi guys how are you , hope you are ok. I have a small problem with my code. briefly my program is about chained sequence numbers which requires a user to enter sequences separated by (-1) in an input file as follow: 123 122 121 -1 45 67 89 -1 …

Member Avatar for SpS
0
98
Member Avatar for Ryan Steyn

Hi there everyone, im new to programming and havent the faintest clue where to start (just so you know:rolleyes: ) . I want to learn C++ but havent the apps to test or write it. I downloaded the microsoft visual studio and it confused the hell outa me. Can anyone …

Member Avatar for jbennet
0
105
Member Avatar for joelw

ok so far this is what ive got for my code im trying to figure out how to start my for loop that will receive the array and the int that represents the count(2)? [code]#include<iostream> using namespace std; struct Student { char Name[30]; float GPA; int Major; }; //Function Prototype …

Member Avatar for Ancient Dragon
-1
311
Member Avatar for sdillinger

In the following snippet of code the compiler (g++ on RH 4) does not see my overloaded operator. I cannot figure out why. Error: parse_opra.cpp: In function `void parseFile(std::istream&)': parse_opra.cpp:19: error: no match for 'operator>>' in 'in >> rec' note: candidates are: std::basic_istream<_CharT,...... ..... opra_record.h:35: note: std::istream& operator>>(std::istream&, Opra_record&) I …

Member Avatar for sdillinger
0
144
Member Avatar for mjmythili

for(i=1;i<10;i++) { cout<<"i= "<<i; } I want to print The label i as well as its value by using Outtextxy. Is it possible. I knew that Outtextxy is used to display strings. but i dont want to use cout.

Member Avatar for vicky_dev
0
579
Member Avatar for newbie2c++

Having trouble getting this to compile. My error message says in line 42 expected ';" before "text" any suggestions? [CODE]#include <iomanip> #include <iostream> #include <cstring> #include <cstdlib> #include <string> #include <ctype.h> using namespace std; struct FORM { string name; string data; }; void getFormData(string, FORM []); //FORM *create_array(int); //string param(string, …

Member Avatar for Anonymusius
0
88
Member Avatar for newbie2c++

I am trying to write a program that will recieve a non-determined number of fields from an HTML form and return their values back to the browser in an interesting way. I am stuck on some of my code because I want to create 1)spaces between the questions 2) add …

Member Avatar for Lerner
0
84
Member Avatar for jobra

Hi I am new to c++. I tried to get current date but when I compile the program, it gives me an error. This is my program [code=cplusplus] #include <iostream> #include <ctime> #include <stdio.h> int main () { char sdate [10]; _strdate(sdate); std::cout<<"Current Date:"<<sdate; return 0; } [/code] when I …

Member Avatar for jobra
0
186
Member Avatar for joelw

ok, im trying to write a function that dynamically allocates an array of integers. The function should accept an integer argument indicating the number of elements to allocate. Lastly the function should return a pointer to the array. If anyone can help much appreciated Thanks in advance

Member Avatar for Lerner
0
386
Member Avatar for snedan

Im usind Dev-C++ and it allows to return more than 1 value :eek:. ok, so here's my code : [code=c] #include <iostream> using namespace std; int intFirst, intSecond, intThird; int BreakUp(int intNumb) { intFirst = intNumb / 100; intSecond = (intNumb - (intFirst * 100)) / 10; intThird = intNumb …

Member Avatar for ~s.o.s~
0
126
Member Avatar for DynamitMsk

Hello, I have a quick question: How do I declare array of strings with a static size entered by user during run time in C++? In C# i'd do [code] // Get user unput (int, # of strings); string[] stringArray = new string[numOfStrings]; //tell user to start imputing the string …

Member Avatar for Ancient Dragon
0
188
Member Avatar for kcdclan

[code] [COLOR=#0000ff]#using[/COLOR][COLOR=#800000]<System.dll>[/COLOR] [COLOR=#0000ff]using[/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] System;[/COLOR] [COLOR=#0000ff]using[/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] System::Diagnostics;[/COLOR] [COLOR=#0000ff]ref[/COLOR][COLOR=#0000ff]class[/COLOR][COLOR=#000000] B {[/COLOR] [COLOR=#0000ff]public[/COLOR][COLOR=#000000]:[/COLOR] [COLOR=#0000ff]virtual[/COLOR] [COLOR=#0000ff]void[/COLOR] F() { Console::WriteLine([COLOR=#800000]"B::F"[/COLOR]); } }; [COLOR=#0000ff]ref[/COLOR][COLOR=#0000ff]class[/COLOR][COLOR=#000000] D : B {[/COLOR] [COLOR=#0000ff]public[/COLOR][COLOR=#000000]:[/COLOR] [COLOR=#0000ff]virtual[/COLOR] [COLOR=#0000ff]void[/COLOR] F() [COLOR=#0000ff]override[/COLOR] { Console::WriteLine([COLOR=#800000]"D::F"[/COLOR]); } }; [COLOR=#0000ff]int[/COLOR][COLOR=#000000] main(){[/COLOR] B^ b = [COLOR=#0000ff]gcnew[/COLOR] D; b-F(); } [/code] It says identifer not found. I dont know why …

Member Avatar for Narue
0
100
Member Avatar for solomon grundy

I need to construct a C++ program where I input from the screen the entries of two 3x3 matrices A and B. My program then computes A-5B. The matrices should be declared as two dimensional arrays. What I have so far [code=cplusplus] #include <iostream> using namespace std; //Define the Matrix3X3 …

Member Avatar for Infarction
0
122
Member Avatar for Cnaly

Could someone help me? I have an [URL="http://www.daniweb.com/techtalkforums/post285021.html#"]file[/URL] in which a list of employees and salaries are listed for each year ex: Year: 2005 No. of Employees: 3 Employee ID Salary 123456 36000.00 123567 32000.00 123678 33000.00 Year: 2006 No. of Employees: 4 Employee ID Salary 133456 31000.00 133567 32000.00 …

Member Avatar for Bench
0
112

The End.