49,757 Topics

Member Avatar for
Member Avatar for queensrose

Hi! I'm supposed to input a large integer value(long int) and output it like this: e.g. input: 123456789 output: 123,456,789 I'm supposed to use recursion for this. I just need suggestions or partial codes - not a full code (I want to learn, not copy). I'm a newbie, and I …

Member Avatar for Duoas
0
169
Member Avatar for jam7cacci

Hi! I was wondering if someone could help me figure out what may be wrong in my installing process or in my compiler... I was installing Visual Studio 6.0 C++ and everything went well until I started compiling and this is what it shows: --------------------Configuration: try - Win32 Debug-------------------- Linking... …

Member Avatar for jam7cacci
0
146
Member Avatar for golden3159

Hey, guys im stuck on this problem. I'm supposed to make a base pyramid in the format: --------* ------*** ----***** Basically, it takes user input and subtracts two on the next line. (e.g. 5, 3, 1) Right now I can only make it go down one by one, I know …

Member Avatar for Lerner
0
94
Member Avatar for MoOou

I have a question I did not understand if anyone of you understood it please explain to me [B]suppose that m and n are integers and m is nonzero. Recall that m is called a divisor of n if n=mt for some integer t; that is, when m divides n, …

Member Avatar for Lerner
0
271
Member Avatar for shasha821110

Hi, all I am the STL beginner and also kind of new in c++. And i got one assignment about write the text utility class with pieces of STL. So the following two function implement totally freak me out. wordlengths() finds and returns the number of words of different lengths …

Member Avatar for orwell84
0
124
Member Avatar for jagsrocknfl

I am currently at Kutztown University enrolled in Computer Science II. I am struggling to finish writing the actual cpp for the program, the implementation and header files are finished. Here are the instructions of the program: Recall that a polynomial is a sum of terms in the form, f(x) …

Member Avatar for Lerner
0
2K
Member Avatar for NirmalRS

Hi! I am final year student doing my project on visual C++. As a part of my project i need to merge number of .avi files in to single .avi file. Could some 1 please advice me on a library that i could use to do that. Thanking you, Nirmal

Member Avatar for NirmalRS
0
101
Member Avatar for daviddoria

I have used boost's progress bar (it outputs ***** from 0 to 100% complete) to track the progress of long loops. It would also be nice to be able to see a counter along with that, like if I run 1000 tests, the *'s will go from 0 to 100%, …

Member Avatar for daviddoria
0
111
Member Avatar for danishamman
Member Avatar for redhotspike

Working on a simulation which closely resembles waiting in a line at a bank. Program runs the simulation based on the user's inputs of # of servers, simulation time, average time between arrival, and transaction time. Here's what I have so far: [code] /*~~~prog3.cpp~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | Author: …

Member Avatar for redhotspike
0
235
Member Avatar for rEhSi_123

Hello everybody, Ran into a bit of trouble! During compilation I get the following error: [code] fatal error C1083: Cannot open include file: 'login.h': No such file or directory [/code] The login.h does exist in my directory folder. Please let me know where I have gone wrong. I am attaching …

Member Avatar for rEhSi_123
0
149
Member Avatar for FallenGenesis77

I was wondering how I would go about saving data within an executable, I'm not exactly sure If I happen to be wording this right so I will elaborate. For example lets say I had an application that would ftp upload specified files, but I did not want to use …

Member Avatar for MosaicFuneral
0
233
Member Avatar for vsha041

Hi, I am trying to write a program, in which it will ask the user to enter a string of length exactly 9. I have got a dictionary file with me which contains over two hundred thousand words. My job is to output all the possible words between lengths 4 …

Member Avatar for iamthwee
0
110
Member Avatar for prabhu_kar

What is the output of printf("%d") What will happen if I say delete this Difference between "vector" and "array"? How to write a program such that it will delete itself after exectution? Can we generate a C++ source code from the binary file? What are inline functions? Details about profiling? …

Member Avatar for mvmalderen
1
143
Member Avatar for sommanatt

How do I get the memory usage of my c++ program? Which instruction that i can put in my program and it can tell the size of memory that my program used? Thank you

Member Avatar for myle
0
2K
Member Avatar for lauren316

Here's my code: [code] #include <iostream> #include <string> #include <stack> using namespace std; int main() { string input; cout << "Enter text for palindrome checker. No spaces or punctuation please." << endl; getline(cin, input); stack<char> stackOne; for(char i = 0; i < input.length(); i++) stackOne.push(input[i]); stack<char> stackTwo; for(char j = …

Member Avatar for lauren316
0
153
Member Avatar for ganmo

Hi, I have some problem to implement the constructors from set.h. There was no problem to implement the empty constructor. But as for: Set(int a[], int n); I have some problem. It is supposed to use insert() function from node.cpp. And since the class Set is friend a friend to …

Member Avatar for Lerner
0
129
Member Avatar for avishekgc_22

Ok, so heres the thing. Firstly I use windows operating system and the Borland C++ software. My program has to do the following:- 1> Open a source code, which is in .cpp format. 2> Monitor the flow of execution and print a message for every occurrence of a semicolon [;] …

Member Avatar for mvmalderen
0
175
Member Avatar for power_computer

I have to do this user defined function return type: double parameters: one (1) type: ifstream (by reference); variable used to read the file description assume the file has already been opened successfully in main() read through the file, average the numbers and return the average to main() to be …

Member Avatar for power_computer
0
114
Member Avatar for edb500

Hi there I have the following problem! Please help! [code=cplusplus]class Base { //private methods void printMyType() { cout << "this is base type" << endl; } //public methods void printAllInfo() { cout << "this An accout" << endl; printMyType(); } }; //end base class class derived : public Base { …

Member Avatar for edb500
0
86
Member Avatar for senaddor

This is not a homework problem. I am studying binary search trees and trying to understand how the code works. I have the code, it works, but I want to understand it completely. I have made comments of what I think code does and in the lines that I don't …

Member Avatar for mvmalderen
0
136
Member Avatar for mhalls

Hi I am trying to read a txt file into a 15x30 multi dimensional array. I am having a few problems with the code. This class is embedded within a class and the cout << seat[i][j] seems to work within the loops when I'm reading in the file. When testing, …

Member Avatar for StuXYZ
0
104
Member Avatar for MyRedz

help.why can't my coding loop properly.,..i notice it can't show the loop of ptrpers[j] ? what did i do wrong.? it didn't show back the input i put on earlier. [CODE] #include<iostream> using namespace std; class person { protected: char name[40]; public: void setname() { cout<<"Enter Name:"; cin>>name; } void …

Member Avatar for MyRedz
0
129
Member Avatar for Zcool31

I'm trying to implement a linked list class in a manner similar to STL. Everyithing seems to work fine, but when I try to implement an output operator to let me see what is inside the collection quickly, it starts acting wierd. Note that I use the iterator inside the …

Member Avatar for Zcool31
0
244
Member Avatar for ARYT

Hi everyone This should be one of our last assignments. Well, not sure, but most probably. As the title implies, we're supposed to write a program using multi-dimensional arrays for a 6x6 matrix multiplication. Here's what I've done. It's almost OK; except the most important part which is the final …

Member Avatar for GreenDay2001
0
511
Member Avatar for nassim87

i need the solution to this 3 programs i c++ : 1. Write a program that inputes frome the keyboard an integer x and calculates the sum of all numbers from 1 to x. 2. Write a program that uses a for-loop to output the power of 2 from 2 …

Member Avatar for ithelp
0
79
Member Avatar for timb89

[code] int log2(int n) { int count = 1; while(!n >= 1) { if (n%2 == 0) { count++; n=n/2; } else { count++; n=n/2; floor(n); } } return count; } [/code] not sure why it isnt working?

Member Avatar for timb89
0
121
Member Avatar for Insomniac119

Everything work except for the fact that it cannot solve the whole puzzle, only a few rows. If somebody could just look over the recursive backtracking part of the algorithm, that would be greatly appreciated. Here's the snippet of code that I think is causing me grief: [code] /* @member …

Member Avatar for mvmalderen
0
1K
Member Avatar for vicky_menonsky

I am trying to write in a file using VC++. my program is to read the entries from the listview and write them in a text file. however i am unable to give newline after each column in listview is written , thus entire listview contents get written in a …

Member Avatar for mvmalderen
0
85
Member Avatar for dekaya

once I have assigned a file name to a stream object, and no longer have direct access to that file name but I do have access to the stream object is there a way to extract the file name from it? It has to know it because subsequent operations read/write …

Member Avatar for dekaya
0
2K

The End.