Beginners - February 2017 (Page 13)

by B260z
Plinko help
 
Hello, I am new to coding and could use some help to understanding what I am doing wrong. I have been trying to fix the errors, but seem unable to do so on ...
[1 reply] : First of look at line 122 which says int main() { .... } You alread... (by Misenna)
Prog unable to re-enter username
 
Dear all, Newbie here. My prog is unable to re-enter username after do-while loop. please guide me. #include <iostream> #include <string> #include <cctype...
[4 replies] Last: Hi Gunnerfunner, many thanks. will try to figure out.. (by xingwangzer)
Files
 
Greetins all, I had an idea for a program project but not sure how to get started. The idea is to create a program that when the user inputs a name of a golfer...
[9 replies] Last: Hello g8whitebuffalo, It would be helpful if you would post the code ... (by Handy Andy)
I need some help.....
 
" write a program that implements the following C++ concepts 1. Data Encapsulation 2. Instantiate classes 3. Composition Class 4. Aggregation Class 5....
[17 replies] Last: The Reports class has member variables such as totalRecords , tota... (by PolloLoco4645)
by sam80
Visual studio C++ and assembly language
 
Hello everyone, I am trying to learn assembly language in C++ MS Visual Studio. In my C++ I have the folloing codes: extern "C" void doit(); void mai...
[2 replies] Last: consider downloading the free masm to go with your visual studio, if t... (by jonnin)
Interesting problem
 
Okay so I have a set of integers that I enter, I have a number N which I also enter, as well as a number K that I also enter. I have to pick K numbers from the ...
[3 replies] Last: comments within the code: #include <iostream> #include <vector> #incl... (by gunnerfunner)
Need help with the code. Struct and Array
 
Hello, this is my first time using the forum so I wasn't sure where to post so I put it in beginner. This is my homework and I try to get code work, so far I w...
[16 replies] Last: I see. Thank you for your help. It's true that I wasn't pay a carefu... (by silver11235)
Template Functions and typedef
 
I was curious as to what the differences and advantages of a template function over typedef? Maybe I don't understand but it seems like the whole purpose of ...
[4 replies] Last: > I don't have to reassign the data type > because the template acce... (by JLBorges)
having trouble connecting things in code? doesnt compile
 
I think I have most (if not all) the different elements I need but I'm having some difficulty connecting everything. It has to have two user entered points, sho...
[15 replies] Last: wow thanks everyone for all the advice!!! i really appreciate it :) (by misslyss)
Problem in file handling in while reading file
 
The file "string.txt" contains a string "Hello World!". When I print ch, the out put shown on screen is only "HelloWorld!". Why? #include<stdio.h> int ma...
[2 replies] Last: When I print ch, the output is HelloWorld! Because the '%s' format... (by mbozzi)
Need Help with the CHAR input ony my program
 
Im not finished with my code yet but Im just trying to figure out how I can make my code say "Error. Please enter one of the available options provided." when t...
[3 replies] Last: check for '1' instead of 1 I should have said that, sorry. this only... (by jonnin)
Problem with Array
 
How can I use the numberStudents value as the limit for scores? cout << "Enter the number of students: "; int numberStudents = 0; cin >> numberStudent...
[4 replies] Last: you can't. arrays cannot be assigned a variable unless using a nonst... (by jonnin)
Code not working
 
Okay. So I am experimenting with some things that I have learned and wanted to make one of my cubes on the screen go from left to right until it reaches x 600, ...
[4 replies] Last: if you call it with 600, it will decrement and return. if you call it... (by jonnin)
Simple question...
 
I'll just ask a simple question... Whats the point of declaring variables after my main() when you already have it in the class private section? I already trie...
[2 replies] Last: This can be a bad thing to do. You can do it, but when you have multi... (by jonnin)
Confused on prototype function help please.
 
I wrote this basic program to provide a remainder of two numbers divided and it works fine. But I'm supposed to make this a prototype function, I've looked onli...
[1 reply] : //This is a prototype, or function declaration. int sum(int a, int ... (by helios)
Distinctive numbers using array
 
How can you write a program to display this Enter ten numbers: 1 2 3 2 1 6 3 4 5 2 (press enter) The distinct numbers are: 1 2 3 6 4 5
[8 replies] Last: If order doesn't matter, there's also a version for lazy people (like ... (by Enoizat)
Problem in file handling in C
 
Why am I getting no value in ch? #include<stdio.h> int main() { FILE *f; char ch; f=fopen("D:\Hello.prat","w+"); ch=getchar(); putc(ch,f); ch...
[1 reply] : The '\' character needs to be doubled. the backslash is used for speci... (by Chervil)
merging two arrays
 
I have written a function to merge two string arrays as below I want the result array to to have arr1 elements first followed by arr2 elements void mergeAr...
[2 replies] Last: you've declared result with a seemingly large size, 10000, but what i... (by gunnerfunner)
Psuedocode transfer
 
// payment = purchasePrice / 12 // output "Customer First Name: ", firstName // output "Customer Last Name: ", lastName // output "Account...
[1 reply] : You could try something like this: // payment = purchasePrice / 12 in... (by Enoizat)
Understanding a certain loop
 
Hi I am very new to programming and i am reading a book called "Discovering Modern C++" by Peter Gottschling. Very early in the book the author sets up an exam...
[2 replies] Last: That cleared it up! :) Thanks a lot! Really appreciated! (by christianvs)
February 2017 Pages: 1... 1112131415... 37
  Archived months: [jan2017] [mar2017]

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