49,761 Topics
| |
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 … | |
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 … | |
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"))? | |
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(); } | |
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... | |
I really need help with this. If anyone could guide me, please let me know. - Sincerely, thank You | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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... … | |
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); … | |
an int function cube () that returns the cube of its single int formal parameter please attach in my emile bmekixavi@gmail.com | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hi, I am bigjam and I want to become good in game development using c++. pls what advice can u give me?. | |
Question1)a program in c++ that display the following pattern to the screen: s ss sss Question2) The Fibonacci series in c++ please help!!!!! | |
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 … | |
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 … | |
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() … | |
1 12 123 1234 12345 ******** ******* ****** ***** **** *** ** * 12345 1234 123 12 1 |
The End.