49,761 Topics
| |
Hello all! I'm new to the forum and need some help. I finished most of the code already but I am stuck now. I'm trying to create a program that shows the interst and payment on a loan. I want to add som code that will sum the amount of … | |
I have a void function that takes data from an ifstream, reads the first value, (which is an ID #), and compares that value against the ID# info from an array of records. If it's invalid, the rest of the line is ignored. If it's valid, it adds the hours … | |
The full structure of a C++ program to compare two strings and check whether they are equal | |
Hi every one i have project and i need your help !! this is the project you can look http://store2.up-00.com/Apr13/Ddd93410.png http://store2.up-00.com/Apr13/9HA93410.png | |
Can someone help me with this? This is part of my first assignment. I am quite new to programming. > A company wants to transmit data over the telephone, but they are concerned that their phones are tapped. All of their data are transmitted as four-digit integers. They wanted you … | |
**how can i create a program that provides 3 types of data structures: linked list, stack and queue.which my program will provide a menu that a user can choose whether to use a linked list, stack or queue.** Example of output: Main Menu 1. Linked list 2. Stack 3. Queue … | |
Need help writing a program for class. Here were the posted instructions: Step 1: The program should have a FUNCTION that displays a screen that shows which seats are available and which are taken. Seats that are taken should be represented by a # symbol and seats that are available … | |
Please kindly help. the login iv already managed to code need help with this part. Upon execution of your program, it should first read the user-ids and passwords from a file and create a binary search tree using the user-id as a key (assume unique user-ids for convenience). Once the … | |
hello altogether, my name is Wolfram Pagels, Berlin, Germany my status is :retired but enthusiastic c++-fan; I use Dev-C++ since 3 month ago; in the 70th I programmed in Fortran; after a long break I enjoy to learn c++11; e.g.: the day before yesterday I got the following message from … | |
Hey .. im doing a game project with sfml and i countered a small problem ,here is my code : #include <SFML/Graphics.hpp> #include <string> #include <iostream> using namespace std; using namespace sf; int main () { sf::RenderWindow Window; Window.create(sf::VideoMode(490, 485),"My First Sfml Game"); sf::Texture pTexture1; sf::Sprite playerImage; if(!pTexture1.loadFromFile("Data/dots.png")) std::cout<<"error could … | |
i am converting a base 10 number to base 4, guide me in this case please. | |
I have a copy I no longer want -- if anyone wants it just pay shipping and I'll give it to you. It's in the original box and includes a cd that contains service pack 5. | |
Hi...I have to bulit code for a parser in c++ which takes a simple txt file in which there are two functions 1 is for addtion of two numbers and 2nd is for printing of result. Parser have to open the file read it line by line and then tell … | |
thanks for helping me... im using c++ language... how can you convert decimal to binary.. should i divide it? can you give me a hint for what code should i use...thanks | |
I want to write a program in c++ language to define a class Bank_Account with the following members: Data member: - Accoount_no. - owner. - Balance. Member fenctions: - To assing intial values. - To deposit an amount. - To withdraw an amount after checking the balance. - To display … | |
| how to create animated figures 0 runs from the top left corner to the upper right corner and back again from the top right corner to the upper left in a row |
My friend didn't want to post this himself so I'm doing it for him. The creatures.size() returns wrong value! I don't know why i push back only two objects and sometimes its returns things like -89252... I'm using Mingw-g++ 4.7.2 . I tested it also on my linux and the … | |
What is inharitance in C++? And what are the types of inheritance? | |
hey guys ! i am new to graphics in c++ .. i have to develop an application called " paint " . i have to implement it using classes ( and inheritance in classes ) . For example i have to draw a line using mouse . All the graphic … | |
write a program that accept 3 numbers.print the smallest and largest number. how we write it by nested if condition? | |
Hi guys I'm trying to use WndProc as a member function, but no matter what I do, I always get a null handle. One thing I'm uncertain of is that when my StaticWndProc is called, the p_hWnd is null. Is that correct? Once it leaves the function it remains null … | |
#include <iostream> #include <ctime> #include <cstdlib> #include <iostream> using namespace std; For all 6-digit numbers from 100000 to 999999, find the numbers that, if you add the top three digits to the bottom three digits, and square the result, it will equal the original number. For example, for 123456, you’d … | |
I have a few code snippets from a tutorial Im reading my friend gave me to learn c++, and a lot of it is written in shorthand but I cannot fully understand the shorthand code. return c < Cnt ? &foo[c]:NULL;; this: return (cc > 0 && cc <= mCnt)?&foo[cc-1]:NULL; … | |
can someone please help for me to change this function to iterative? int recursive(int n) { int total = 0; if(n>=3) return recursive(n-1) + 2*recursive(n-2) + 2*recursive(n-3); else if(n>=2) return total + recursive(n-1) + 2*recursive(n-2); else return total+1; } | |
hi! i have a program in C++ that produces a right triangle of character and i need the same program, i mean a program that makes the same function, but in C. This is my program in C++ : #include <iostream> using namespace std; int main() { int i,j; char … | |
#include <iostream> #include <fstream> using namespace std; class a{ public: void set(int x){num = x;} int get(){return num;} private: int num; }; int main(){ ofstream o_("test.txt"); o_.close(); ofstream os("test.txt", ios::binary | **ios::app**); a o; o.set(1); os.write(reinterpret_cast<char*>(&o), sizeof(a) ); // a o2; // o.set(2); // os.write(reinterpret_cast<char*>(&o), sizeof(a) ); os.close(); a o3,o4; … | |
I am writting a simple C++ programm and I want to generate outputs to the console but with the functions 'fwrite' and 'printf'. However, I can't print special characters like 'á', 'é', ... Here is a simple code: printf("Special character: 'ñ'"); Were the output was `±` I found that those … | |
In the following program I'M trying to take a number no more than 12 digits long and make it a factor of 3. If the input is 1, the program would turn the number into 001. If the input is 12, the program would turn the number into 012. If … | |
Hello, I have been messing around and writing more and more intricate calculator programs on MVE C++. The issue I am having right now is my program is not running unless I give my add, sub, etc. a value. When I try to just leave them as int add; or … | |
Hello, I am new to C++ and I was trying to write a simple calculator program that has a do-while loop and also includes a series of != statements. Even though I make the statements with all the appropriate keystrokes it keeps giving me my invalid sign statement. Also, I … |
The End.