Beginners - November 2013 (Page 60)

Student Programmer
 
I am writing a program for class and I can't figure out what i did wrong. Its two loops.The first loop is a counter and the second is asking the user if they wa...
[6 replies] Last: give a value to count variable inside the do. int num, count; do{ ... (by closed account ivDwAqkS)
by ephekt
display 1st char of string
 
I have been trying to find a way to only display the first letter of the middle string but have been having difficulties can someone pleases help? #includ...
[4 replies] Last: There are probably several ways, here is one. #include <iomanip> ... (by SamuelAdams)
Getline headache
 
I've got a class below that seems to skip the first getline call and I can't figure out why. All that is in the main function is the include for this class a c...
[2 replies] Last: Thank you!!! (by Wanderer)
Help with minesweeper program
 
Hi, I'm new to programming and I'm trying to create a minesweeper program. At the moment it's a bit of a mess but I thought I'd tidy it up once it worked proper...
[2 replies] Last: In your reveal function When you call calc surrounding, you need to... (by sherre02)
sorting numbers in ascending order
 
Hello So I need some help with sorting numbers in ascending order. I'm making a program which generates lottery numbers, but I don't know how to sort the in a...
[3 replies] Last: you could also use a recursive function. There is a problem with your... (by IWishIKnew)
GCF error D:
 
Revise the program so that it prints out all the steps involved in the algorithm. Here is a sample output: GCF (500, 300) => GCF (300, 200) => GCF (200, 100) =...
[2 replies] Last: wow , thank you so much I was doing this int Gcf(int a, int b) { ... (by closed account ivDwAqkS)
by Al GIS
Stop this loop!
 
I have most of this code figured out, but my professor wants us to include a counter. Here is the pseudocode: Assign counter 10 While counter is greater t...
[3 replies] Last: Thank you for your help, cire and mk12345. Definitely pointed me in th... (by Al GIS)
How to require a user to press enter twice
 
Okay, so I don't really have any code for this specific problem just yet. Mostly because I don't even know where to get started despite various google searches....
[3 replies] Last: Press ENTER twice to finish http://www.cplusplus.com/forum/beginner/24... (by Duthomhas)
by Nebur
Hamming numbers algorithm
 
Hi everybody, I am doing a program that is supposed to print the n first hamming numbers, where n is a number given. Code works OK, but too slow to be accept...
[no replies]
Tic Tac Toe
 
Hi! I've been very interested in the Beginner Exercises on this forum but have come to a challenge that I'm having a difficult time finding enough information o...
[2 replies] Last: Alright so now I have done a bit more based on what you said: #inclu... (by StaticBlue)
by wwcase
How do I read this code line?
 
I am wondering how you read this line of code: for(const char*c = inputLetters.c_str();*c; ++c) I understand the inputLetters.c_str() and the ++C, but what do...
[1 reply] : It is a poorly formed loop, as it will not always iterate over all cha... (by LB)
Hypotenuse of a triangle
 
can someone help me i have to create a Hypotenuse of a triangle app, the user has to give the angle an the opposite, im a beginner so i dont no how to start ...
[5 replies] Last: By the way, in c++ it is preferable to use a const rather than #define... (by Chervil)
by Nefri
Malloc string
 
Hello i need allocate memory block in my string and then free memory but I don't know how use it correctly. string retez1, retez2; unsigned int vel...
[8 replies] Last: thank you, once again :) last thing i must check is if i have inputs l... (by Nefri)
by Nebur
Route distance
 
The input is a sequence of routes. Every route starts with a word that identifies it, and then, there is a sequence of two or more pairs of doubles that represe...
[4 replies] Last: Still I modified it so that the first values are the initial x and y b... (by Nebur)
Help With C++ Multiple choice Qs 1-6
 
Can you please verify my answers. 1. Define char str ="Hello world"; cout << &str << endl; What will be the output of above code? A. Hello world B....
[3 replies] Last: yes i am wrong about question 1, haven't been to raw pointers for a wh... (by nvrmnd)
How do I write this recursive equation? Do I need pointers? could someone please hlep
 
Have to write this recursive equation, anybody can help... how to write in c++ A(t+1) = K0*[1-exp(S)]+ A(t)*exp(S) could you please help? got problems wr...
[5 replies] Last: A(1) = 1; This is it. However, a recursion is not what you need. R... (by keskiverto)
binary search
 
Does anyone know how to get the fast time for the words to pop up using binary search please ? #include <fstream> #include <iostream> #include <string> #i...
[no replies]
value and reference :/
 
Hi , can you help me to understand this: " Passing by value and passing by reference " -what is the difference between them ?? -give me an example whe...
[2 replies] Last: thank you (by BlackBug)
Parallel Array help
 
Think I've got most of this complete but need a little help for current project. This is what it is supposed to do. - Create two parallel arrays (one for trip ...
[no replies]
help me I'm new programmer
 
Hi every body , I hope everyone doing well . I just need your help pleas if you can and I will be thanks . Write a program that reads in a line of text (u...
[3 replies] Last: #include<iostream> #include<cctype> using namespace std; char type... (by waad abdulla)
November 2013 Pages: 1... 5859606162... 80
  Archived months: [oct2013] [dec2013]

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