Beginners - June 2013 (Page 35)

printing cin data to an outFile
 
My program runs and executes perfectly, but I do not know how to get the data you cin to print to my outFile....help??!! #include <iostream> #include <fst...
[3 replies] Last: Thank you both for your input it really helped me understand and get m... (by wreglefan)
Help with display.
 
I can not get the by switching packages to display. ]#include<iostream> #include<cctype> using namespace std; int main() { char package; double ...
[1 reply] : FORMATTING!!!!!!!!!! Your code never gets to the part where is checks ... (by Tertius Kgatla)
Need help with a code
 
Hi guys! Im doing a very simple program that asks for two inputs (2 names) and the program compares if the last names are the same or not. At school we made t...
[3 replies] Last: Thanks guys :) (by Fassenkugel)
String input validation with while
 
How to use while statement for bad input validation? For example user must input Yes or No, and if its correct, while statement should not be executed. If input...
[1 reply] : while (value != "Yes" && value!= "No") (by vlad from moscow)
Finish code having an algorithm
 
Help me please to finish writing this code http://en.wikipedia.org/wiki/Pollard's_rho_algorithm_for_logarithms I mean the programm must returns the answer =...
[no replies]
What is wrong with my calculator code?
 
Hi there, I've just started trying to learn C++. I wrote this bit of code that I thought would be fairly simple that would work as a simple calculator with +,-,...
[3 replies] Last: Just adding in for interests here. I'm more of an idiot! when running... (by Tertius Kgatla)
String Help
 
How Would I Add A String Into It To Ask For Your Name; using namespace std; int main(){ int friends; int age; int kids; int number; cout<<"Hello! ...
[2 replies] Last: Thanks! (by BeastlyHex)
2 byte char array needed c++?
 
i need 2 byte char type so I can store A+ in array I need to save this data in size 10 array A = A+ A =B+ A =B- A =A- A =A+ A =C+ A =D+ A =D- A =D+ A =C- ...
[7 replies] Last: You're using a compiler from 1997? You might want to consider obtaini... (by Catfish4)
question on tree traversal
 
The answer for the following question is given as postorder... Q)One can convert a binary tree into its mirror image by traversing it in Can anyone plz let me...
[2 replies] Last: Have you read up about tree traversal? Tree traversal http://en.wikip... (by andywestken)
by Larry2
Regex oddity
 
Hello, running this test : // match_results::begin/end // - using smatch, a standard alias of match_results<string::iterator> #include <iostream> #incl...
[2 replies] Last: Done and solved :D Thanks ! (by Larry2)
"Error C2065:'cout' and after that "Cannot find or open the PDB file''
 
Hello . My OS is Windows 7 (service pack 1- ultimate - my OS drive is C.) and i use Microsoft Visual C++ 2010 Express. I wrote very simple program in C++. (...
[2 replies] Last: Thank you for your answer. But after these Information the output didn... (by Michael007)
by zagzag
Unwanted conversion
 
Okay So this is a simple program I made to try to figure out how to print a decimal from a class. However I tried a lot of things and my getfucntion is converti...
[4 replies] Last: zereo thank you a lot for your explanation. It was very clear and und... (by zagzag)
using for statements
 
Hi, I have a problem using "for" statements. I had to write the same program using the "while" statement a while ago and it works fine, but when I tried to do i...
[3 replies] Last: Oh nvm, got it. I forgot to change the 10 to 0 on one of the parts. (by lurksalot)
repeating part of a function..please very urgent!!!
 
i want to make a funcion to ask for mark and then keep asking if the mark is below 0 and above 100. i want to know how to repeat just a part of a program.. ...
[3 replies] Last: Recursive: int read_valid_mark() { int mark; std::cout << "en... (by JLBorges)
by giblit
Problem with template and class
 
This is probably a really easy fix but I just cant seem to figure it out.. I am trying to make it so say for example I have a class that will store a large num...
[5 replies] Last: Cool thanks works when I put the definition in the header. I didn't kn... (by giblit)
by hakim
Making a program which returns text from numbers
 
Hello guys, I am currently a beginner in programming. I am trying to write a program in C++. Apparently, the program should return text from numbers; upto m...
[3 replies] Last: No problem I was actually doing this the other day with one of the eul... (by giblit)
help with the exercise
 
I'm trying to do exercise 1.11 on the c++ primer which is Write a program that prompts the user for two integers. Print each number in the range specified by th...
[9 replies] Last: what I would do is something like this #include <iostream> int main(... (by giblit)
by vnii
Help with journal
 
Hi,I am trying to write a program that lets the user keep a journal or a diary. This is what I have so far. #include<iostream> #include<string> #include<fstre...
[8 replies] Last: that worked. thanks ice. im forgetting a lot of little details. (by vnii)
No Variables But Pointers
 
Is it bad that instead of a program which has a variables and pointers, all it has are pointers, no variables. Why am I doing this? Just because with pointers, ...
[6 replies] Last: As you said, memory in heap is slower to free than the stack But what... (by cire)
Help me understand this line of code
 
if(bookAuthor .find(search,0) < bookAuthor .npos){ // displays bookTitle and bookAuthor I think "bookAuthor .find(search,0)" starts looking at the...
[3 replies] Last: std::string::npos is a static data member of class std::basic_string o... (by vlad from moscow)
June 2013 Pages: 1... 3334353637... 49
  Archived months: [may2013] [jul2013]

This is an archived page. To post a new message, go to the current page.