49,766 Topics

Member Avatar for
Member Avatar for garu525

Good day to all, I'm doing a project about inverse permutations from an array of permutations. It's my first time coding on permutations so I don't have any experience on this. So I came up with a solution to just swap the array and the element number as the inverted …

Member Avatar for mbundgaard
0
942
Member Avatar for thenewbiecoder

I'm just starting to learn c++ and need to know how would you read the first line from a file and write to a new file? thanks

Member Avatar for WaltP
0
257
Member Avatar for ambigouscase

Given the number of commodities bought, create a program that computes the total amount purchased in a fast food center. Assume that the following unit price of each commodity Fried Chicken= 29.75 Cheese Burger= 25.00 French Fries= 18.50 Soft Drinks=14.25

Member Avatar for cherrymae.calma
0
185
Member Avatar for Faux

I need help making two substrings(I think) to get the integer values (course hours, grade) for each course. I thought I had it but every time I ran the .exe it would crash after obtaining the name and major, so I deleted that code altogether. It'd be grand if someone …

0
66
Member Avatar for weakprogrammer

Hey everyone I'm new here and I need help with a homework assignment that allows the user to make change. The assignment is as follows: You will write a program that will calculate the minimal amount of coins needed to make change for some amount of cents. The program will …

Member Avatar for Narue
0
197
Member Avatar for rockerjhr

if you declared/defined a virtual function for a class and redefined it in a derived class so that when you call the derived class it calls its own version of the function and not the base class function , how do you call the base class function on the definition …

Member Avatar for Fbody
0
196
Member Avatar for Deepali_Jain

I am compiling a VC++ source file in VS2008 licenced edition. Using the following header files: #include <regex> But I am getting the below error while compiling. fatal error C1083: Cannot open include file: 'regex': No such file or directory Please advise what Iam missing here.. :(

Member Avatar for Ancient Dragon
0
967
Member Avatar for somshridhar

Dear Sir, I am tring to convert integer to string and using string for further find and replace operations. While doing so I am using for loop to for integers and then wants to store all these integers in strings. But I did not succeed. But If I use only …

Member Avatar for somshridhar
0
321
Member Avatar for vrs1155

friends i am learning visual c++ 6.0.i need to know how to connect the database(oracle).can you tell me how to do??.give me some example.... mfc application connect to oracle database,any example ??? thanking you

Member Avatar for Stefano Mtangoo
0
562
Member Avatar for supersuru

hey can any 1 help me out here coz i am new to c++ and have couple of errors Using a program that gets the product of even numbers and sum of odd numbers between 1000 and 100, demonstrate the syntax and implementation of the different types of loops. have …

Member Avatar for Fbody
0
155
Member Avatar for dionisov

Ok my question is: How I can create a window into my window.(My dialog is ready in .rc file) I want to complete my level editor for my new game but I've got problem with the toolboxes. I've got one white filled window with menu. Menu>>Tools>>Object Manager. When this is …

0
105
Member Avatar for meli123

heyyy guysss....just trying to make a code to proove .999=1 any ideass?? :)) ty!!

Member Avatar for doug65536
-1
270
Member Avatar for Pwnerz0r

I am trying to create my login system but I have got a problem with reconizing the value from a file. getline(fstream) recognizes it and puts it in a char(reg_confirm), but I can't set a different function for a different value. it should go like this: if (value == "0") …

Member Avatar for Eagletalon
0
177
Member Avatar for sujan.dasmahapa

Dear Friends I have a dataset like below. 1 means Straight line with startPointX,startPointY,endPointX,endPointY. ////////////////////////////////////////////////////////////// 1 0.000000 24.600000 -15.500000 28.575000 1 -15.500000 28.575000 -37.700000 28.575000 1 -37.700000 28.575000 -37.700000 36.515000 1 -37.700000 36.515000 -59.920000 36.515000 1 -178.200000 52.000000 -138.200000 52.000000 1 0.000000 24.600000 0.000000 19.000000 1 -125.421613 36.515000 -138.200000 52.000000 …

0
76
Member Avatar for supersuru

hey please could you help me out i have a problem with this code the normal cash is taking me to the transfer[CODE]#include <stdio.h> #include <conio.h> void main() { char x,ch1,y,Y; int pin=12345, account=12591,account1, choice; int fcash, famount; //char login[10]=’joeliwain’ int withdraw, deposit, transfer, amount; printf(":--------------------------------------:\n"); printf(": Welcome to ATM …

Member Avatar for Ancient Dragon
0
571
Member Avatar for themarval

I have created a header file and a main.cpp file in Visual Studio C++. I have the concept down but i'm not sure that my program is written correctly as it is failing with teh following error; error C2447: '{' : missing function header (old-style formal list?) I want to …

Member Avatar for themarval
0
157
Member Avatar for hopper24

#include <iostream> #include "Invoice.h" using namespace std; int main() { string description; double price; int quantity; cout << "Enter the description: "; getline(cin, description); cout << "Enter the unit price: "; cin >> price; cout << "Enter the quantity: "; cin >> quantity; cout << endl;//a new line //create an …

Member Avatar for hopper24
0
204
Member Avatar for robdb

I've created a list of strings and load a text file in it. once list is created, the program have to read it, do something and write results in a new text file. [CODE] ofstream f; f.open("filename.txt"); string key; list<string> text; static char ALPH[21] = {'A','B','C','D','E','F','G','H','I','L','M','N','O','P','Q','R','S','T','U','V','Z'}; int* index_t = new …

Member Avatar for raptr_dflo
0
533
Member Avatar for Zssffssz

Ok how would I make a program take one file (thats not a text file) and save with a different name like there is a file with asdf.7z and I want the program to save a copy of it as qwer.7z how? And is there any way to do something …

Member Avatar for raptr_dflo
0
151
Member Avatar for trantran

[CODE] struct S{ int i; double d; S(const S & incoming_S):i(S.i),d(S.d){} }; void test(){ S myS=S( /*temporary variable*/ S(23,3.14) ); } [/CODE] Questions: 1) During initialisation, is the temporary variable S(23,3.14) actually created or can it (and is it actually for typical compilers such as VS2008) optimised away? 2) Same …

Member Avatar for trantran
0
176
Member Avatar for ryandunn

I am trying to get the number of months on one side to pay a car loan off and then the other side to have a decrease in the money owned. I have been staring at this thing for about 2 hours and i dont understand why it won't subtract …

Member Avatar for Zvjezdan23
0
106
Member Avatar for Zssffssz

Well how would I do it? Make something like winrar but alot less compresstion ratio and in a cui? PS sorry for not answering many questions alot of this stuff is in a different side of c++ I dontnormaly use?

Member Avatar for Zssffssz
0
85
Member Avatar for robdb

I wrote a program that creates a text file with some letters using ofstream. Now I would like to format the text so that the letters are written in groups of 5 and the rows are all the same length( i.e. DANIWEBFORUM becomes DANIW EBFOR UM). To do this the …

Member Avatar for thines01
0
148
Member Avatar for Deepali_Jain

I have a function C++ file, created in VS 2005. But I am not sure how to register that function in mysql, so that it get stored somewhere in mysql database and when the query runs, it should retrieve the func definition from the database itself.. Please guide me with …

Member Avatar for Deepali_Jain
0
272
Member Avatar for GSLENK

So in the beginning, Im sure i can ditch #include <string>... Im sure at the end, where i have a million cout's (42-69) that could be simplified (i feel like the inverse of the distributive property in math could be applied. I want the ouput to look the same. this …

Member Avatar for Fbody
0
180
Member Avatar for maria536

Can someone help me I keep getting an error code on this line and I cannot figure it out. cout <<"Encrypted digits:"; << digit_three; digit_four; digit_one; digit_two; << endl;// display encrypted numbers ________________________________________________________________________________________ #include <iostream> // required to perform C++ stream I/O #include <iomanip> // required to perform setprecision stream …

Member Avatar for maria536
0
189
Member Avatar for Aarowaim

Hey,I've been dabbling in programming for about a year and a half now, and I understand pretty well how to use the basic commands and such, although I still have to refer back to a documentation on some libraries to fix problems, but I have begun to effectively snipe out …

0
121
Member Avatar for qbunia

I`m having serious problem. class Set { Point_<int> point; int val; double *module; }; Mat m; Set s; m.push_back(s); It says see reference to function template instantiation 'void cv::Mat::push_back<Set>(const _Tp &)' being compiled When i add <Set> after push_back it brings me: see reference to class template instantiation 'cv::Mat_<_Tp>' being …

0
34
Member Avatar for ziyadgodil

i hav car racing program in c++ and i wish to convert this program in c what i do? prigram is this...... [CODE] #include <iostream.h> #include <dos.h> #include <graphics.h> #include <conio.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <ctype.h> class car { private: int x1,y1,x2,y2,col,col2,col3; public: car():x1(200),y1(300),x2(270),y2(200),col(4) {} car(int a,int …

Member Avatar for Taywin
0
567
Member Avatar for george08.08

Hello. I am trying to validate a customer number using isdigit. If the user accidently enters a character other than an integer, I want it to allow the user to try again. The problem is it only will check the first number and if that is a digit it it …

Member Avatar for george08.08
0
3K

The End.