49,761 Topics

Member Avatar for
Member Avatar for babyluxe03

hello! im trying to make my own stack program in c++. but my code doesnt seem to work. I got 6 errors, been trying to figure out what are those and how to solve it but theres no progress. Can somebody help me with my project. I would greatly appreciate …

Member Avatar for Moschops
0
311
Member Avatar for hariza

Hi guys, If i have a file like the one below what would be the best/easiest way to sort the words in alphabetical order. thanks. with an equal mix of biosolids to make the compost Sawdust is on their greens Compost applied properly will enhance growth of grass flowers shrubs …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for hail2dthief

I'm using visual c++ compiler and I want to change the text color in my c++ dos program. What choices do I have if i don't wanna use system function (example: system("color 0a"))?

Member Avatar for Ancient Dragon
0
23K
Member Avatar for amcath

Hi Could you please tell me how to solve this simple problem in c++. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a=5,b=3; int y=a-b++ * --b; /* manually I get the answer as 6 , but the compiler gives as -4 . how?*/ cout<<y; getch(); }

Member Avatar for deceptikon
0
246
Member Avatar for hatre
Member Avatar for samtechae

hae all, how can one make a program that will count number of items in an array and also insert item at certain positons in an array.Thanks in advance...

Member Avatar for anku gupta
0
127
Member Avatar for TheDarkHorse

I really need help with this. If anyone could guide me, please let me know. - Sincerely, thank You

Member Avatar for rubberman
0
111
Member Avatar for muneebhasan

Imagine you are developing a software package that requires users to enter their own passwords. Your software requires that user’s passwords meet the following criteria: • The password should be at least six characters long. • The password should contain at least one uppercase and at least one lowercase letter. …

Member Avatar for richieking
0
295
Member Avatar for chubbyy.putto

How can i get this code to show once and it counting all the positive? When i enter a 10 numbers. it show The positive are.... The positive are.... The positive are.... The positive are... The positive are... ... until 10 can someone show me how to make it show …

Member Avatar for Ancient Dragon
0
172
Member Avatar for javed.iqbal.3979

Hi all,, A module of my Bank Management System which should display the user account details after successfuly entering his/her details calls to a function: void display_acc(int n) { account acc; int flag=0; ifstream inFile; inFile.open("account.txt",ios::in); if(!inFile) { cout<<"File could not be open !! Press any Key..."; return; } cout<<"\nBALANCE …

Member Avatar for NathanOliver
0
151
Member Avatar for nhrnjic6

program works fine until I call print_List function : void print_List() { Vagon *kondukter = head; while(kondukter != 0) { cout << kondukter->num<<" "; kondukter = kondukter->p_next_num; } cout << kondukter->num<<" "; } and that it opens some some new boxs that says : win checking for solutions. I used …

Member Avatar for nhrnjic6
0
321
Member Avatar for javed.iqbal.3979

Hi Coders!!! I am developing a Bank Management System ..In one of its provided facility i.e.new account creation i am having problem with gets(name) . void account::create_account() { cout<<"\nEnter The account No."; cin>>acno; cout<<"\nEnter The Name of The account Holder :\n"; gets(name); cout<<"Your name is :"; puts(name); //for check purpose …

Member Avatar for Ancient Dragon
0
194
Member Avatar for _Nestor

I have a question about how the message loop works in a windows application [code] while ( GetMessage(&msg, NULL, 0, 0) ) { TranslateMessage(&msg); DispatchMessage(&msg); } [/code] Does the windows o/s maintain a message queue that the app retrieves a message from the front of then dispatch it bck to …

Member Avatar for shinejos
0
376
Member Avatar for haider885

runtime error "not recognized as an internal or external command, operable program or batch file" # include <stdio.h> # include <stdlib.h> # include "iostream" using namespace std; int main() { char ch; cout<<"Do you want to Logoff your computer now(y / n) \n " ; cin >> ch; if (ch …

Member Avatar for haider885
0
113
Member Avatar for Felix Arba

Hey guys ! I hope I'm not posting this topic in wrong place . I'm new to DaniWeb forum , although I've been previously following certain articles as a guest . Anyway , let's get to bussines . I have this problem , as titles says , I need to …

Member Avatar for Felix Arba
0
176
Member Avatar for rowen_1

1)How would you give a short and good explaination to someone who is a beginner in programming of the following * short * long * typedef * const

Member Avatar for deceptikon
0
173
Member Avatar for klika

So i have to write a c++ program for the Graeffe's square root method I have am stuck here when i have this formula transform into c++ code, the formula is on the link The code works particulary, the (elem[j-1]*elem[j+i]) doesn't work, it's beeing ignored and i don't know why... …

Member Avatar for tensity
0
1K
Member Avatar for triumphost

I've created: #include <streambuf> #include <iostream> #include <windows.h> template<typename T> class BufferedStream : T { private: T &stream; std::streambuf* buffer; //planning to use this to create other "IO" functions. public: BufferedStream(T &stream) : stream(stream), buffer(stream.rdbuf()) {} ~BufferedStream() {stream.rdbuf(this->buffer);}; std::ostream& operator << (const char* data); std::ostream& operator << (const std::string &data); …

Member Avatar for Ancient Dragon
0
270
Member Avatar for anoniya ze

an int function cube () that returns the cube of its single int formal parameter please attach in my emile bmekixavi@gmail.com

Member Avatar for Learner010
0
133
Member Avatar for klika

The part for(int i=1; i<n; i++) { x[i]=sqrt(y[i]*i); cout<<"x"<<i<<": "<<x[i]<<endl; } isn't working wll, for some elements the result is non, i thought that i because the numbers are complex, but not with include complex i get the same resut.. can anyone help me #include<iostream> #include<math.h> #include <complex> using namespace …

Member Avatar for ddanbe
0
133
Member Avatar for isralruval

how would i write a function that parses a hex number as a string into a decimal integer. I have the following done i just need help finishing it. any help will be appreciated[code]#include <iostream> #include <string> using namespace std; int parseHex(const string &hexString) int main() { cout << "Enter …

Member Avatar for sheetal Phapale
0
4K
Member Avatar for kbear23

I am new to CPPUnit testing and have written test for login authentication function with various test cases. But it only accepts return value zero. The first test case should return 1 if expected and actual are the same but it only works when I change to zero. Any advice …

Member Avatar for Ancient Dragon
0
246
Member Avatar for sohail.butt.144

i need help to make this program please help me Problem Statement: Write a program using class(constructor, destructor, other member functions) to find the frequency of letters (small and capital alphabet or digit) from your student id character string. For example, frequency of letter ‘4’ in the string of a …

Member Avatar for lala56565
0
185
Member Avatar for hahahanz

not sure where to post this but anyways I wrote this code to calculate the max profit from a 5 kg max weight. heres the code. there is an error with the price. when I use small values below 20 its all normal but when I input large values there …

Member Avatar for iamthwee
0
115
Member Avatar for bigjam

hi, I am bigjam and I want to become good in game development using c++. pls what advice can u give me?.

Member Avatar for richieking
0
83
Member Avatar for qalooc

Question1)a program in c++ that display the following pattern to the screen: s ss sss Question2) The Fibonacci series in c++ please help!!!!!

Member Avatar for deceptikon
0
51
Member Avatar for 2concussions

Hello!! So I just started moving over from Java to C++ and am having problems. All I am trying to do is make a simple MessageBox and when I try to run this code: #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ MessageBox(NULL, L"Hello World!", L"Hello …

Member Avatar for rubberman
0
261
Member Avatar for tessa.burkhalterblackmon

Below is my code so far that ask user for how many numbers they want to input. This program can calculate average based on the numbers that the user input but I also need it to find the product or multiplication of all the numbers entered. I know how to …

Member Avatar for tessa.burkhalterblackmon
0
378
Member Avatar for nhrnjic6

How do I add second element ? right now it works and I get output of 13, but lets say I want list of 2 elements, how do I do that ? here's my code : #include <iostream> using namespace std; struct Vagon{ int num; Vagon *p_next_num; }; int main() …

Member Avatar for AndrisP
0
167
Member Avatar for frew

The End.