- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 8
- Posts with Upvotes
- 8
- Upvoting Members
- 8
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Hello! i'm only a beginner in programming and only have a few idea about creating a program. We have an assignment to create a hangman: Write a program that plays the game of Hangman. The program should pick a word(which is coded directly into the program) and display the following: … |
|
Re:
Hello to all programmers out there. Considering the growing request for practice problems by the beginners, we ( Me, Joey, Niek, Aaron..) have decided to start a sticky which will host some common practice problems which would help the beginners in understanding the programming concepts in a better way. (Did … |
|
Re:
well i tried to execute the following code.. #include<process.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<stdio.h> void main() { system("dir"); getch(); } but it did not execute the system command... what went wrong?? plz mail me at [email]prajwaludupardx_369@yahoo.co.in[/email] |
|
I am implementing RSA in C++ and here's my design(code structure). *keygen.h* namespace rsa{ class keygen{ public: //Constructor keygen(size); //Generate keys void generate(); //Getters string gete(){ return xyz; } .. .. .. private: //initializes bignums void initall(); keygen(){} //Private Member variables goes here } } *prime.h* namespace rsa{ //First 100 … |
|
Re:
Hello, so I recently started reading on arrays and I have an assignment to make a program that removes the necessary elements from an array of integers so that the array consists only of increasing integers, for example, transform {2,3,5,1,6,2,3} to {2,3,5,6}. Now, I do not know of any possible … |
|
Re:
Hello, I need to take a four digit integer and re-arrange it as follows... pre: 1234 post: 3412 I have been searching for a method to convert a char array to an int, so I can use the code below. Am I using atoi() incorrectly? The result I get when … |
|
Re:
I am assigned the sort-of famous RMS assignment. This is what I have so far, it is just beating me. My biggest confusion is how to add the entries up. I think I will okay with squaring them, dividing the total and obviously the sqrt() at the end. [CODE]#include <iostream> … |
|
Re:
[B]Problem question:[/B] Given the sequence A and B, where A is the inorder traversal value and B is the pre-order traversal value, reconstruct the binary tree that produces such results when performing inorder and pre-order traversal on that binary tree. To reconstruct the binary tree you can simply print the … |
|
|
Re:
Hi everyone just started Daniweb! I have been using devcpp for some time.I am trying to make a switch from DevCpp to Visual Studio but find the latter confusing having so many options. Recently, I did a console application that will accept a word from user and prints its anagrams. … |
Re:
Hello I have hit a wall with this issue, been at it for a few hours now and it is bewildering to me to say the least With that being said, the below code is giving me some erroneous answer during the execution. The user enters a number from the … |
|
Re:
Hello, I am new to C++ and very lost. I have attempted this program but my output displays file was unable to open. I am not sure I am even on the right track. Here is my project: Write a program that reads strings from a file into a vector. … |
|
Re:
Hey guys, now I have an assignment to create code that will ask for a number and then calculate the factorial of it with a for loop in a separate function and return the value to main.. Here is my code, I think it looks pretty good, but when I … |
|
Re:
What is cout? It's a variable, yet it can print stuff on the screen. Also, << (Left Shift Operator) isn't like the one for the variable cout. How does cout work? cout isn't even a macro / #define. |
|
Re:
I figured this would be easy but ultimately I can't seem to get past the " " in a char array. i.e. [CODE] const int ARRAY_SIZE = 80; char charArray[ARRAY_SIZE]; cout << "input a sentence"; cin >> charArray; [/CODE] "This is a test string" returns only "This" as the space … |
|
Re:
I'm trying to reverse a string in pairs Example: input - heaven output - ne va eh My code seems to be right until the last for loop... That's where I need help Here's my code: [CODE]#include <iostream> #include <string> using namespace std; string revString(string user); int main() { string … |
|
Re:
Background: I learned old-school c++ programming techniques, being able to declare global variables before the main() routine. However, in Vis C++, I am having trouble, especially with global arrays. I am programming a Windows Forms application. In it, I declare a global integer array just after all my includes in … |
|
Re:
[CODE]#include <iostream> // required to perform C++ stream I/O #include <iomanip> // required for parameterized stream manipulators using namespace std; // for accessing C++ Standard Library members // function main begins program execution int main(){ double wage = 0, raise = 0, raiseMoney = 0; int years = 0; // … |
|
Re:
Hello All, I am having a problem making my program display and output correctly. When i run my program my count will display but my word will just give me some kind of line. Can you please help me correct this? Thanks Ronnie [CODE] #include <iostream> #include <string> #include <iomanip> … |
|
Re:
Hello guys! Basically I have this basic homework, the program must check if the digit sum of one of the 3 inputted integers is equal to the difference of 2 others. So if A = 56, B = 33 and C = 22, the program should output 56, cause 5+6 … |
|
Re:
Having trouble trying to read characters from a file into a 2D array. I know this topic has been discussed before but your help will be greatly appreciated. I know there is more efficient ways of writing the entire code but im not that familiar with programing. Any suggestions are … |
|
Re:
Hello, I wrote a little program (Create a vector and give it back via pointer.) for a better understanding of pointers. First it works but when I would like get access to the vector alloacated with "new", problems occur. For example saving a element is not possible. [ICODE] #include <iostream> … |
|
Re:
help guys, this code tells me that the sleep identifier is not found. has anyone got an idea on how to resolve this? |
|
Re:
[CODE]#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char ch; do{ cout<<"press Q or q to quit,press any key to continue : "; cin.get(ch); cin.ignore(); if(ch!='Q'&&ch!='q') cout<<" you want to continue?\n"; else cout<<"you press q to quit "; }while(ch!='Q'&&ch!='q'); ; system("pause>NULL"); return 0; }[/CODE] my … |
|
Re:
Okay so someone may have already posted something like this but my assignment is due in like 4 hours and don't have time. So here is the problem and my code. My problem that I am having is that it only works for single words. Not whole sentences. I need … |
|
Re:
Hello, basically I'm trying to write a program where you ask the user to input 2 positive number. Then the program will print the lower of the two numbers to the higher of the 2 numbers and then higher of the 2 numbers to the lower of the 2 numbers. … |
|
Re:
I'm up to finish an assignment for my C++, but there must be some thing wrong with the codes.... hope someone will able to give me a hand~ so...here's the title assignment: Program generates a random math problem, dealing with the : addition, subtraction, multiplication, or division of integer values. … |
|
Re:
I am a beginner in c++ and now i reached in array processing binary search. my program is being compiled but it is not showing any result. Please help me out. [ICODE] #include<iostream.h> #include<conio.h> const int n=10; void main(){ int a[n] , l , initial, final, mid,data; for(l=0; l<n; l++) … |
|
Re:
First of all, this is not schoolwork but rather me trying to read about c++ and through program examples and see if I can write my own. So help is much appreciated if you could as I am a new learner. This program that I am writing is supposed to … |
|
Re:
}[CODE]#include <stdio.h> #include <string.h> struct cd_detail { char group[20]; char name[50]; int year; double price, playtime,costTotal; } cd[7]={{"Alan","Tibet sing",2008,51,600}, {"Thubasa","Fly away",2007,52,700}, {"Alan","I love China",2010,53,500}, {"pitbull","Jump to jump",2005,54,720}, {"pitbull","crazy mix",2009,48,630}, {"pitbull","Let we ROCK",2010,49,608}, {"Alan","Sakura mansume",2010,56,909}}; void main() { char group[20]; int k; printf("Enter group>"); gets (group); printf("Name \tYear \tPrice \tPlaytime\n"); printf("========\t=======\t======\t=============\n"); … |
|
Re:
Hi All. I am trying to learn linked lists, and I am a little bit confused what the next pointer as well as the head pointer does. I was reading a tutorial online, and they gave this example. [CODE]#include <iostream> #include <string> using namespace std; struct Family { string nameOfFamilyMember; … |