49,761 Topics

Member Avatar for
Member Avatar for stereomatching

[code] Mat_<double> const affine = (Mat_<double>(2, 2) << 0.5, 1, 0, 2); Mat_<double> coordinate = (Mat_<double>(2, 1) << 20, 3); Mat_<double> C(2, 1); C = affine.mul(coordinate); // this line would crash the program C = affine * coordinate; // this line is ok [/code] I don't why and how, did …

0
74
Member Avatar for garu525

I would like to program that reads a file with 6 lines that have 7 numbers on each line. The output should save a file with sum, average, max and min of each line. For now I just have to figure out how to get the max and min numbers …

Member Avatar for garu525
0
297
Member Avatar for Bigbrain99

Hi guys, I just started to learn class in C++ and get confused by some of the codes [code]class FLATMATE { string name; public: FLATMATE() { name = "";} FLATMATE(string n){name = n;} string getName(){return name;} void setResident(string n){name = n;} }; //Below are the base class for different duty …

Member Avatar for Bigbrain99
0
101
Member Avatar for aznlitomik3

Hi, This is what I have done so far (below) I'm having a problem with the spacing as shown in the output (below the code) Can anyone please help me fix the spacing? Thank You!! ************************************************** ************** CODE: [CODE]#include <iostream> using namespace std; void question (int input); void calendar (int …

Member Avatar for Lerner
0
146
Member Avatar for javanub123

hai, i was wondering if you guys had any advice on getting into game programming with c++ i have a pretty basic understanding of the language and was trying to find out how to do this kind of stuff but so far i havnt been able to find out much. …

Member Avatar for javanub123
0
213
Member Avatar for doolali

Hey guys, ive just started learnng c++ after a year or so of java, one issue that has just cropped up for me is repeating input from console. if for example i ask for an input, expecting just 1, and the user inputs 2 with a space inbetween how do …

Member Avatar for doolali
0
547
Member Avatar for nubore

[code] void Sort() { int Holder, k = 0; srand( time(0) ); // seed random number generator while ( k < HowMany ) { Holder = rand(); // generate random number to Holder if ( Holder > 10 && Holder < 100 ) { Numbers[k] = Holder; k++; } } …

Member Avatar for tenorsax08
0
107
Member Avatar for bmos31

So I have an assignment to redefine an array-based Stack push() function. The problem itself sounds like it totally defeats the purpose of a stack, but this is what I have been assigned: Rewrite the push function so 'myTop' is always 0 instead of one more than the index of …

Member Avatar for Fbody
0
150
Member Avatar for cableguy31

I need to write code that can determine if an IP address is in a subnet based one the subnet address and mask. I don't even know where to begin with this, so any tips would be appreciated. Thanks.

Member Avatar for cableguy31
0
1K
Member Avatar for ButterFly21

#include "p2.h" #include <iomanip> #include <string> using namespace std; /* * Converts an amount measured in cups to milliliters. * 1 cup = 236.518538 milliliter * * cups - amount measured in cups * * returns amount in milliliters */ double convertCupstoMilliliter(double cups) { //modify -1 below to be your …

0
52
Member Avatar for ButterFly21

I have given instructions to write some code and i have to follow the comments giving and i get stuck and some point so can anyone tell me what i did wrong /* * Returns the percent change from the original to the desired servings. * The percent is expressed …

Member Avatar for ButterFly21
0
80
Member Avatar for kanna5836

Project Makcik Minah has opened a new children art class. During the Registration Day, 30 children have registered. Makcik Minah’s assistant, Munah has manually obtained information from the children that include name, birth certification number, date of birth and gender. All these information is required in order to divide the …

Member Avatar for packetpirate
0
173
Member Avatar for miturian

So, in the course of a simulation of a neural network I have two classes: neurons and synapses (which are basically the coupling between neurons). Synapses mediate information between neurons, so a neuron has to be able to speak to a synapse, and that synapse has to be able to …

Member Avatar for Fbody
0
120
Member Avatar for ButterFly21

Why a i getting this message after i compile my program c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libmingw32.a(main.o):main.c|| undefined reference to `WinMain@16'| [CODE]/* * p2.cpp * * Created on: Oct 7, 2010 * Author: saturner */ #include "p2.h" #include <iomanip> #include <string> using namespace std; int main (); /* * Converts an amount measured …

Member Avatar for Nick Evan
0
138
Member Avatar for fidget08

Im having trouble with this program. I attached a picture of what is required. Thanks for any pointers you guys :) p.s. I'm very new to this.

Member Avatar for quila1
0
123
Member Avatar for Dimesh

Hi. ----- Thanks for reading ... I want to write for example: ln 3 Is there is any command or function for it ...!

Member Avatar for sharathg.satya
0
4K
Member Avatar for IS_student

[COLOR="Green"]hi; i am doing a homework(due tomorrow) and i have a problem with it; when I compile the program it shows no errors, and it takes input ,but does not show the output using function print(); note :the function of the program is to take elements from user,stores them in …

Member Avatar for IS_student
0
111
Member Avatar for mrinal.s2008

Hi, the code analysis tool we use gives below warning for the functions in which memset / memcpy is used "The function writes outside the bounds of dup on line 303, which could corrupt data, cause the program to crash, or lead to the execution of malicious code." could someone …

Member Avatar for Fbody
0
219
Member Avatar for Intrade

What I want to know is if I can call a function defined in a C++ class in Visual Basic through a .dll generated from VC++2010? Is this possible, or do I need to define the .dll with C++ raw functions outside of a class? For example, my class looks …

Member Avatar for Ancient Dragon
0
260
Member Avatar for Anuradha Mandal

The output of this code shows only one student's informations. But I want to display the all students' informations. Please find what is wrong?

Member Avatar for vidit_X
0
87
Member Avatar for vbgrad

I need to use arrays, insertion sort algorthm to come up with a program tht will sort 3 employees salaries in an ascending order after user has inputed data..thus EMPLOYEE1:20000 EMPLOYEE2:15000 EMPLOYEE3:10000 CAN SOMEONE HELP WITHE THE FUNCTION TO MAKE MY PROGRAM DO THAT PLEASE!

Member Avatar for stevanity
0
171
Member Avatar for Dha...1

I'm planning to buy a few books for C++. I want to learn C++ at it's deepest. You may say, I want to be C++ program developer. I'm currently having C++ in my study courses too. Which are recommended books? This thread has a huge list of books. Don't think …

Member Avatar for rsravi74
0
152
Member Avatar for jmcorpse

This is what I have to do. Write a program that has a Fibonacci number calculating function. The function will take an integer as a parameter which is the Fibonacci number to calculate, and return the Fibonacci number. Then use this function to calculate the sum of every Fibonacci number …

Member Avatar for jmcorpse
0
100
Member Avatar for a-hall

I need to put the names entered by the user in alphabetical order. What are my variables to declare? Im wanting to use something like this in my code but do not know what my array is or anything. selection_sort(arr1, arrSize); [CODE]using namespace std; int main () { string temp; …

Member Avatar for stevanity
0
127
Member Avatar for geekykitty

This is the output: Amount: 69.73 Dollars: 69 Quarters: 2 Dimes: 2 Nickels: 0 Pennies: 3 this is NOT ONLY for 69.73. It's any amount in general. I know how to figure out the amount of dollars needed. But how would you figure out how many quarters, dimes, nickels, and …

Member Avatar for PatrixCR
0
64
Member Avatar for BryantFury

so im calculating the avergae of 5 numbers ive put in the array but when i compile i get a very large number heres my code [CODE]#include <iostream> using namespace std; int calcAverage() { int sum=0; int average; int TESTVALS[5] = {2, 18, 1, 27, 16}; for(int i = 1; …

Member Avatar for BryantFury
0
112
Member Avatar for sonjeriff

Hi! I'm new this semester to C++ and it is a little difficult for me. Our class has a project where we need to implement functions. While I got the very first one right, I'm not sure what to do about the others that are similar to it. Can anyone …

Member Avatar for cmccaig
0
185
Member Avatar for FieryAbyss

This is the assignment: Purpose: The purpose of this assignment is for you to demonstrate your ability to design and code a program that employs a multi-decision construct such as else...if, or switch to resolve a problem that has a multiplicity of conditions to be evaluated. Use the else...if for …

Member Avatar for kes166
0
166
Member Avatar for geekykitty

I know how to get it, basically. It's just for my program, it's 362 minutes. That is 6:02. The thing is it's ZERO two. I don't know how to get the zero and then the two?

Member Avatar for Unimportant
0
94
Member Avatar for cmccaig

i know the minimal basics of a lambda function, could someone give me the breakdown of each part in the function

Member Avatar for cmccaig
0
95

The End.