Beginners - June 2016

Need help with these random numbers
 
So I've been trying to learn c++ alone with help of guides, but I came to a problem where I needed to know (as funny as it sounds) how many pack of breads and s...
[3 replies] Last: Thanks! I'm really new to this and I'm doing problems in spanish. I di... (by Carcamo)
by pmas98
Doubt in using an array
 
I have a big doubt into converting an integer into an array in C++. So, actually the doubt is in using this array<int,5>. How do i use it? B/c i need to do the...
[7 replies] Last: Easy, just use the rule you established earlier. Set all elements to ... (by closed account 48T7M4Gy)
counting digits of a number
 
Hi every one I have a question. I joint a c++ class and they taught us how to make a program that can counts the digits of a number . But there was something ...
[2 replies] Last: Hi, c here is used as a counter. it basically counts the digit. lets ... (by Root919)
object created in Function accessible by other functions?
 
I created an array of objects in a function...now is it possible for me to access those objects in a separate function? void seasonEpAssign() { const i...
[1 reply] : is it possible for me to access those objects in a separate function?... (by AbstractionAnon)
File input question
 
I'm building a program to randomize show selection for game of thrones. I built a class for use as an episode template. I want the show title to be incl...
[1 reply] : Use getline. http://www.cplusplus.com/reference/string/string/getline/ (by AbstractionAnon)
by hamlet
help withthis code
 
i am trying to saved one in one list the result of my permutation and give me error. The code is like fallow: #include <algorithm> #include <cassert> #include ...
[3 replies] Last: How to use code tags - http://www.cplusplus.com/articles/jEywvCM9/ (by closed account E0p9LyTq)
Loops with array and pointer, which one is better
 
Hi all. My question is the same to the title of this topic, i'm not sure using pointer and array which ones is better (i mean faster) here is a simple code de...
[4 replies] Last: > i'm not sure using pointer and array which ones is better (i mean fa... (by JLBorges)
Help with coding error
 
I have done this short program to process students marks, ca;cu;ate percentage pass and fail but every time i enter the marks I miss one entry.The number wrote ...
[6 replies] Last: while(cin >> mark && mark != -1) { // ... } (by closed account 48T7M4Gy)
difficulty of a 3d game?
 
I wasn't sure how to title this, because I don't know much of anything about programming or languages other then words I've heard. My extent of knowledge with c...
[2 replies] Last: I also would recommend to post on the job section. Learning the skills... (by Thomas1965)
adding cascaded data in a text file
 
Dears, Having a text file contains data like: 2 4 5 6 8 10 How to add the neighbouring data in C++, I mean to add each two and three channels as: 6 (2+4) 11 ...
[1 reply] : Having a text file contains data like: You'll more than likely need... (by closed account 48T7M4Gy)
Getting this error for the first time(don't kno what to do)
 
Hey guys,so I'm working on a small project of mine and got some errors while compiling the source. The program has a Config class to store the configuration ...
[6 replies] Last: Heres my Github repo tht ive made:- https://github.com/MaBunny/My_IRC... (by MaBunny)
Bool Function
 
Cannot find what is wrong, please help create a bool function to check the entered word is whether a palindrome. Thanks for your help in advance. #incl...
[6 replies] Last: Thank you Half Life G Man, You saved me from the last few days to sol... (by judylove)
POS System using c++
 
Hi guys, as you may know (in my username) im a noob programmer. So i want to ask help on what i did wrong? there's few error but it contradict my idea/thinking ...
[3 replies] Last: if (choice == 'No' || choice == 'no') // in my compiler theres an err... (by jlb)
Program returns imprecise results
 
The answers my program returns are all off by minute amounts double getDistance(string fileName, string activityType, string reportType){ ifstream megaFile; ...
[2 replies] Last: I'd say the use of eof() as the loop condition is a problem. Try re... (by Chervil)
main must return 'int' . Please i can't find my mistake . Could somebody help me.
 
#include <iostream> #include <fstream> #include <cstdio> #include <string> #include <exception> using namespace std; void pixelToGrayscale(int& r, int& ...
[2 replies] Last: ... Thank you so much ! What a stupid mistake ... Have a nice day :) (by DodoTedo)
Processing an input file
 
I'm writing a program that takes in a file in the format: id number name address phone number The input file will repeat this set of four lines an unspec...
[1 reply] : Is the file format fixed, or can you change it? If you are able to ch... (by jlb)
Reversing a multi digit number
 
#include<iostream> using namespace std; int main() { int number, reverse = 0; cout<<"Input a Number to Reverse and press Enter: "; cin>> number; // ...
[16 replies] Last: Great really Nice expalanation...love it.. U rock.... (by salmanasghar12)
Clean Code and functions
 
Can anyone please review my code and tell me how i can improve upon it? Like adding functions, whitespace etc. Any help is appreciated! My code: http://co...
[2 replies] Last: I would start by fixing the compiler warnings: main.cpp||In function... (by jlb)
by danban
Testing for a specific letter in an array of characters
 
I prompt them for a code (will be in the format 'a1111') and I need to test the first letter. If the first letter is a 'C', a 'D', or an 'H', the program will o...
[2 replies] Last: That worked perfectly, thanks! And sorry, I didn't know how to do tha... (by danban)
Cant understand why this isnt working
 
I have a pn_count() function that is supposed to calculate the number of prime numbers under a given parameter. This function works based on the sieve of atkin ...
[3 replies] Last: Every time that you call atkinsieve() the function will execute. Tha... (by ne555)
June 2016 Pages: 123... 25
  Archived months: [may2016] [jul2016]

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