Beginners - March 2014 (Page 7)

Program starting a new line of code
 
Hey guys just joined today, I have very little experience with C++ only about 4 months so be gentle. Anyone I have this program and it's working fine the only t...
[2 replies] Last: Thanks guy! (by alvaro4657)
by tavuk
Not getting it
 
I fallen behind in class. Stress, generally and mostly stress. The semester isn't over yet, I can get back on track I know it. I plan on going to some tutoring ...
[1 reply] : The three main reasons for using classes are: -Organization (similar ... (by Daleth)
Implenting invalid number code
 
Writing a program to get the average of 2 scores on a movie. I'm trying to make it so if you input a number less than 0 or greater than 100 it will display "Inv...
[4 replies] Last: if (metascore < 0 && metascore > 100); The semicolon ends your if s... (by wildblue)
Notation problem exp(x)
 
My book is telling me to write a program that takes in the value of "x" and outputs x^n/n where n is 1-100 (100 separate values to display). My book tells me to...
[no replies]
How to include two forms?
 
im doing this: in form1: #include "form2.h" && in form2: #include "form1.h" its redefinition error since im including form2 ...
[5 replies] Last: Why are your include guards named after the file that's being included... (by xismn)
Trying to write a program to count the number of vowels in a user specified file.
 
This is what I've come up with so far. My professor made it clear he wants us to use the string class to get familiar with it. I don't know what function to use...
[3 replies] Last: In long double main's code snippet, vowelPos is technically size_t... (by xismn)
comments causing build fail
 
Just getting re-aquainted with C++, so I did this.. // // Program to convert temperature from Celsius degree // units into Fahrenheit degree units: // Fahre...
[3 replies] Last: I don't know what you mean by "Also, please you code tags std::co... (by giblit)
by merta
LINKED LIST
 
I try to learn linked list. Can anyone give a program example about linked list in particular circular linked list? Or can anyone suggest an article that includ...
[2 replies] Last: Thank you very much. (by merta)
by Gyes
Can someone explain this bubble sort example to me
 
Hi. I'm trying to learn C (no prior programming experience) and came across this bubble sort example: To me it appears that the first time the if-statement i...
[4 replies] Last: You are right that is exactly what will happen (by ccsdude)
by isxj
Sum of prime numbers below 2 million - Optimization?
 
Hi, this is my attempt to calculate the sum of all prime numbers bellow 2000000. Even though it's kinda fast (took about 6.5 seconds in Code::Blocks) I was won...
[2 replies] Last: Well, I thought that it was already optimized xD. But I changed the se... (by isxj)
by xx1182
Inizialize object in class
 
Let's suppose i have this: class A { public: A(char*); } class B { public: B(); A aObj; } Where do i inizialize aObj?
[2 replies] Last: The initialisation list in B's constructor would seem a sensible place... (by mutexe)
A simple answer for a little question about c++
 
I have an assignment to complete within next 5 days so i searched the everywhere for answering that question it's my fist task. So i couldn't find a perfect ans...
[no replies]
by Mido14
Shapes
 
how to get output in the same level #include <iostream> using namespace std; int main() { int n; cin>>n; for (int a = 1; a <= n; a++) { for ...
[no replies]
Help with arranging numbers in descending order.
 
Hey every in new to programming and need to help creating a program that arranges 3 numbers in descending order. I have searched online for help, but many of th...
[9 replies] Last: Now extend your code to sort 4 numbers in descending order. (by AbstractionAnon)
access private member variables in copy constructor
 
In the copy constructor, why can the Tricycle reference copied directly access its private member variables speed and price ? class Tricycle { pu...
[3 replies] Last: Always. (by AbstractionAnon)
if statements dictated by char
 
Hello, I must be missing something pretty fundamental with if statements, but I cant put my finger on it. The way this code sits, my first if statements:...
[1 reply] : I figured it out. I realize you need to make every possible outcome fo... (by Bluebaron)
Dungeon Crawler Start
 
Hi, I'm making a dungeon crawler type game, and the first thing I am trying to do is get the board to work with a player that can move around on it. For some re...
[6 replies] Last: Thank you! (by Jamerack)
please help
 
. Write a recursive function with the signature int Count(vector<int> arr, int value) that counts the number of times value occurrs in the vector arr and ret...
[5 replies] Last: i am working on it now. thank you :) (by newprog135)
BEGINNER NEEDS HELP!
 
I am brand new to this and for the life of me cannot figure out why this keeps printing out every answer. I want to create a random number generator which then ...
[5 replies] Last: You're welcome :) (by wildblue)
software keeps suggesting I use a comma??
 
I have a question that asks to compute the sum of the squares of the first fifty numbers and store them in a variable integer called total using a for statement...
[2 replies] Last: Thanks, it was looking for this, with no brackets: total = 0; for (k ... (by justin00)
March 2014 Pages: 1... 56789... 79
  Archived months: [feb2014] [apr2014]

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