Beginners - August 2015 (Page 4)

by Winsu
The current directory is not valid
 
I have written a code and when I compile it, the compiler launch this"the current directory is not valid"...I dont what's happening... I have a file which n...
[no replies]
How are variables stored?
 
When I declare a variable, say int x = 8; What has happened? The computer knows to find 4 bytes of memory, keep track of the address of the first byt...
[5 replies] Last: I'm now reading up on symbol tables and therein lies the answer. The ... (by thetexan)
algorithm concept
 
Hello forum, I have a 2D array make of std::vector and I want to print out the contents in a certain patterns. There are two pattern to access the each row o...
[2 replies] Last: Or toggle a bool: bool goForward = true; ... if (goForward) forwardPr... (by dhayden)
!cin looping errors
 
Alright, so this is about avoiding erros when someone would enter a letter or something that isnt an integer. This work without crashing the program if you were...
[4 replies] Last: @LB @rafae11 Thank you both for your answers, ill read what you linke... (by qvantry)
Problem with sum
 
Write your question here. can somone help to me with sum? 1 collum sum up correct but second one is divided by 2 collums. How i need suum up all collums not to...
[7 replies] Last: The 'abc' in your program (if that reference is ambiguous, then the bl... (by keskiverto)
by Jon15
Calling a function for temperature conversion
 
I am having trouble correctly calling/creating my function for Kelvin. #include "stdafx.h" #include<iostream> using namespace std; using namespace...
[18 replies] Last: No problem Jon, it's not the end of the world. (by closed account 48T7M4Gy)
Array in descending order
 
I wrote a code for sorting an array in descending order, it seems overly complex. I think I should be using a for loop and passing a value as far to the left as...
[1 reply] : Are you required to create your own sorting function? If not, just use... (by LB)
by Jon15
Temperature conversion, infinite loop help
 
I am writing a program that will have the user input a temperature in either C or F, then have it converted to the other with the option to have it also be conv...
[2 replies] Last: What do you mean? Here is an updated version, not sure if it is better... (by Jon15)
by Sid123
equivalent in C++ from VB?
 
Hi, I learned vb pretty well and now i am learning c++ can someone give me the syntax for the equivalent of the following code in VB? Say I have an array of st...
[3 replies] Last: Well, technically, with std::string arr , what we have is an simpl... (by JLBorges)
cin.ignore?
 
i have to write a program that reads a sentence/1 character and will display all the characters selected in uppercase/lowercase. problem i have is the sentence...
[1 reply] : #include<iostream> // #include <conio.h> // using namespace std; #inc... (by JLBorges)
going through the alphabet using object arrays
 
So I was watching a lecture about allocating memory and the instructor gave a challenge where i have to make a program that goes through the alphabet a - z usin...
[2 replies] Last: wow so simple and it worked thank you! (by helios103)
validating a phone number
 
hello everyone, I am trying to validate a phone number so the program will check if the user inputted this format (123-45-6789). The phone number is inputted as...
[5 replies] Last: So I changed a few things around, so the function will re-prompt for a... (by jpanther)
Array and While Loop
 
If I remove the While loop, everything works fine. But if I include the While loop, the program will ask for 2 times the number of temperatures asked. Any id...
[17 replies] Last: Yep, it will output "invalid etc". This leaves you, as the programmer,... (by closed account 48T7M4Gy)
by Dazzer
Question about the use of namespace
 
I have a question about the use of namespace. Consider the two programs below, both of which yield the same result. What is the point of using namespace when ...
[14 replies] Last: to give a cross-library example, we have, between the C++ standard lib... (by Cubbi)
Sorting array of structs
 
struct dadosEquipas{ char nomeEquipa ; int lugarCampeonato; int numPontos; int numJogos; int numVitorias; int numEmpates; int numDer...
[12 replies] Last: Ah yes, the issue was that you had copied the data into the vector and... (by LB)
struct defined in friend class as argument
 
Hello all, I am trying to implement an iterator to a BST class, but I am having trouble with a private function of the iterator class which should have a str...
[2 replies] Last: Thanks a lot! It worked :) (by SophieM)
by samrux
Am I naming identifiers wrong?
 
Right now, I am used to naming variables and functions with the most descriptive names possible. However, I'll name small or unimportant things starting with a ...
[3 replies] Last: Thank you. Also, I think I accidentally reported a comment here from ... (by samrux)
by Zyzz
Cannot build anything
 
Hello, I got a new computer over summer and I'm starting another semester of c++ programming in the fall, so I wrote a basic program to help refresh my memory b...
[9 replies] Last: You see you forgot the semicolon at the end of line 13, don't you? (by mido70)
Functions
 
HELP PLEASE! Problem: Define the functions called within the main function. Do NOT edit the main function. int main(){ int num,choice; do{ num=askNum()...
[2 replies] Last: Do NOT edit the main function. Your code uses a different main funct... (by dhayden)
My rand() function does not work
 
My rand() function does not work I have fiddled about and it does not seem to want to work I an trying to make a guessing number program. If you could help me t...
[3 replies] Last: http://www.cplusplus.com/faq/beginners/random-numbers/ (by Duthomhas)
August 2015 Pages: 123456... 28
  Archived months: [jul2015] [sep2015]

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