49,757 Topics

Member Avatar for
Member Avatar for ashishchoure
Member Avatar for ashishchoure
0
84
Member Avatar for lotrsimp12345

Still having trouble install opencv. I used cmake doing what was told and it created files in a folder then i ran the install VC++ project. After which I went back to cmake and generated the examples. ran those. My path environment variable is C:\OpenCV2.0\bin, I was wondering whether it …

0
57
Member Avatar for Icebone1000

I have something like this: [CODE] VOID *pVBRes; ... pVBRes = new vposnormaltex[(Vfaces.size()/3)]; ... dynamic_cast<vposnormaltex*>(pVBRes)[i].pos = .. reinterpret_cast<vposnormaltex*>(pVBRes)[i].tex = .. reinterpret_cast<vposnormaltex*>(pVBRes)[i].normal =.. [/CODE] What cast should I use ( IF I should use, I dont know if it will work..)

Member Avatar for Salem
0
105
Member Avatar for roc a

I have started this program and it builds fine but when I debug it I get a run-time check error #3, the variable total_sales is being used without being defined. Can some one help me out with this?[code]#include <iostream> using namespace std; void main() { int sp[10][7] = {89, 92, …

Member Avatar for thomas_naveen
0
193
Member Avatar for murschech

A rather old C++ book I have says that one class may be declared a friend class of a second, and then the first class can access the private data of the second. I tried this example [code] #include <iostream.h> class secret { friend class not; private : int a; …

Member Avatar for Abivino
0
126
Member Avatar for CVlaxstar

Hey guys, I'm mostly done with this but need a little help with multiplication and the output. (Just outputting +'s) [CODE]#include<iostream> using namespace std; class Polynomial { friend ostream &operator<<(ostream&, Polynomial&); private: int degree; int coefficient[10]; public: Polynomial(int, int[]); Polynomial operator+(Polynomial&); Polynomial operator-(Polynomial&); Polynomial operator*(Polynomial); }; Polynomial::Polynomial(int d, int c[]) …

Member Avatar for Lerner
0
136
Member Avatar for cruisx

Hey so i am trying to create a file and this is part of my code. [CODE] HANDLE hFile; if((hFile = CreateFileA("Testfile.txt", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0)) != INVALID_HANDLE_VALUE) { //and so on [/CODE] Now the problem is that i cant create the file in the program(exe) path. I …

Member Avatar for Frederick2
0
134
Member Avatar for dabboo

Hi, I am new to programming. As an absolute newbie, I downloaded codeblocks and wrote my first programme i.e. Hello World. But when I hit F9 key of my keyboard, the programme didn't run. Can someone guide me as to how a programme is run after writting it in the …

Member Avatar for dabboo
1
91
Member Avatar for Tech E

I have looked and looked and looked at this. I can not figure out why I am getting a random crazy number for salary. Can someone please help? (Sorry for the length) [CODE]//Personal Class Definition #include <iostream> #include <string> using namespace std; //Personal class definition class Personal { public: Personal(string, …

Member Avatar for WaltP
0
160
Member Avatar for mrnobody

Hi, I'm doing a code in MFC to retrieve DateTime from SQL 2005 and then after do datetime manipulation on it. In the SQL table, the date field is 3/16/2010 2:28:20 PM (obtained by using getdate()). I then retrieve the date from RecordSet and stored into _variant_t. To confirm that …

0
66
Member Avatar for thedonflo

I need help writing this program and it has to have user input. It has to be C++ language 1) Write a program that displays the following diamond shape. You may use output statements that display either a single asterisk (*) or a single blank. Maximize your use of repetition …

Member Avatar for Lerner
0
114
Member Avatar for thedonflo

I really need help with this project. 1) Write a program that uses a switch program structure 2) Upon user input your switch structure shall calculate and display one of the three loops for loop, while loop, and do-while loop calculations.

Member Avatar for Stefano Mtangoo
0
111
Member Avatar for dwdude

Hello there. Finally decided to make an account here :) Anyways, I just started trying to implement function pointers in my code, and I seem to be having a few issues. (this is, of course, test code): [CODE] #include <iostream> using namespace std; class MyClass; class SomeClass { public: SomeClass(); …

Member Avatar for dwdude
0
2K
Member Avatar for naveedmahar
Member Avatar for rectifryer

[CODE]#include <cstdlib> #include <iostream> #include <cmath> #include <iomanip> #include <cctype> using namespace std; double distance(double,double,double,double); double radius(double,double,double,double,double); int main() {double X,secX,Y,secY,z,r; r=0; cout<< "Please enter the x value of the center of the circle:"<< endl; cin>>secX; cout<< "Please enter the y value of the center of the circle:" << endl; …

Member Avatar for Banfa
0
398
Member Avatar for janice777

basic over view>> banks offer car loans for periods ranging from two to five years (24 to 60 months). Write a program to allow the customer to enter the price of a car, the down payment amount and the annual interest rate of the loan. The program should display the …

Member Avatar for janice777
0
183
Member Avatar for tararengan

hello, I am running a merge sort routine on an array of numbers. My intention is not to output the sorted array but to reorder the indices of the array so that they reflect the sorted order (descending). For example, if the array were {2, 7, 4}, my indices would …

Member Avatar for tararengan
0
121
Member Avatar for Phil++

Hey, I'm writing this report and I'm writing about variables.. I'm just checking to see if this is a good description: [I] Variables are used in programming to allocate specific memory locations for data, Variables enable the programmer to give a specific name to where the information is stored in …

Member Avatar for WaltP
0
82
Member Avatar for nerdy900

I was starting a cash register program. I got to the point of a simple test. I ran into a problem where when running the loop to input my variables, it completely blows through the loop the first time. I looks like this: Product: Product: ---------now I could input [CODE]#include …

Member Avatar for nerdy900
0
134
Member Avatar for RayvenHawk

I'm doing an assignment for my AI class and while trying to compile the sample code from this weeks chapters I get the 2 following errors. I'm certain I've tackled this before in my 3d programming class, but that was almost a year ago and I'm drawing a blank here. …

Member Avatar for daviddoria
0
142
Member Avatar for StTheo

I'm working on an AVL tree, and I've been getting segfault errors when trying to access one of my nodes. The error is raised when I try to call the balance() function for one of my node's children. [code=c] ////////////////////////////////////////////////////////////////////// /// @file main.cpp /// @brief The main implementation file ////////////////////////////////////////////////////////////////////// …

0
41
Member Avatar for SilentDuck

I'm trying to create this pattern: [url]http://mathworld.wolfram.com/Rule60.html[/url] I cannot get my code to print this. It runs, it just does not print the right pattern. I know I am doing something wrong, I'm just not sure what. [CODE] #include <iostream> #include <fstream> using namespace std; int main() { //Declare variables …

Member Avatar for Banfa
0
208
Member Avatar for Valaraukar

Hi, Basically I have a game type scenario in which objects are falling from the sky onto uneven terrain below but my problem is this: I can't figure out how to determine when an object has actually collided with a slope (the point of impact) because obviously the y value …

Member Avatar for Fbody
0
89
Member Avatar for timbomo

Im trying to figure out how i will calculate items needed. for example for every 500 sqft of space, one gallon of paint and 8 hours of labor is required. how will i put that n to a formula

Member Avatar for timbomo
0
202
Member Avatar for eternaloptimist

/*could someone show me how to create a text file named names.dat with names in a directory with an executable file? i want this program to find a name after i enter it. here r the names that i want to put into names.dat.:*/ "Collins, Bill", "Smith, Bart", "Allen, Jim", …

Member Avatar for Lerner
0
136
Member Avatar for eternaloptimist

i need a function to line up the info with these columns.: Name Test 1 Test 2 Test 3 Average here is the code that i have so far.: [CODE]#include <iostream> #include <iomanip> using namespace std; void arrSelectSort(float *, int); void showArrPtr(float *, int); void showAverage(float, int); int main() { …

Member Avatar for Fbody
-2
1K
Member Avatar for Tech E

I am trying to figure out the best way to create a dynamic array/vector (not sure which) that would take in a string and double and store it. I then need to print the string with the corresponding double into a list and produce a total for all the doubles …

Member Avatar for Lerner
0
107
Member Avatar for sikeufoo

[CODE]while (y==1) { float discount,addcost; pricetopay=calpricetopay(ty,pricetopay,addcost,discount); cout<<endl; cout<<endl; cout<<"\t\t\tTOY TOY Shoppie"<<endl; cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; cout<<endl; cout<<"Name of item:"<<ty.name<<endl; cout<<"Price of item:"<<ty.price<<endl; cout<<"Made in:"<<ty.madein<<endl; cout<<"Manufactured Date:"<<ty.date.d<<"/"<<ty.date.m<<"/"<<ty.date.y<<endl; cout<<"Price to be paid: "<<pricetopay<<endl; cout<<"Do you want to proceed with another transaction?"<<endl; cout<<"If yes, Please type '1'. If no, please press 2 to quit."<<endl; cin>>y; }[/CODE] …

Member Avatar for Fbody
0
131
Member Avatar for amol14007

I have been trying searching the net, for source code for converting RTF file to text file in c/c++. The source that i get is in RTF file format which conatins is specific tag but i need to convert it to simple text file and upload it.. Any source link …

Member Avatar for amol14007
0
217
Member Avatar for donazri

Hello guys. I'm trying to create a program, that reads a file, and create an output. Here's the questions: Write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the …

Member Avatar for LevyDee
0
174

The End.