Beginners - September 2019 (Page 12)

by mareli
How to go about organizing my C++ files?
 
hi guys, c++ beginner here. I'm reading 'Programming: Principles & Practice Using C++' and have just managed to compile and run my first .cpp file from the M...
[7 replies] Last: got it. i will keep that in mind down the road. thank you for your hel... (by mareli)
Help with Understanding Recursion and Functions within other Functions
 
Hello all, I have recently gotten back into programming after some years away. I'm currently attending classes for Comp Science, and I've read back up on the...
[2 replies] Last: Ahh I see. I should have disregarded the first initial output of Valu... (by AspiretoProg)
problem with fscanf
 
There seems to be something wrong with this: if((fscanf(ifile, "%c", &c)) == NIL) abort_run("Fatal: Unable to read from ifile.\n") ; ifile has...
[13 replies] Last: adding a print to see what the value of c is, I still get the first ch... (by jonnin)
the output of a simple code
 
Hi! First, sorry for my english. I start to learn c++ and I have some questions about some code. #include <iostream> using namespace std; int main() ...
[3 replies] Last: if it were j = 1, its easy. you multiply the two... and get 40. but... (by jonnin)
Switch Doesn't Work
 
When I run my functions menu1(), menu2(), menu3(), and menu4() by themselves they run fine. When I call them in in Switch, menu2() and menu4() don't work. I've ...
[2 replies] Last: You mean they go to the functions but then keeps going without stoppin... (by zapshe)
C++ Error - Class related
 
Hey guys just writing simple code to learn how things work with classes. I normally split everything into header files but for the sake of learning I did eve...
[1 reply] : Line 21: class Child: public Parent (by deleted account xyzzy)
Function Call is Undefined
 
I have a function that works fine when I created it in main. I moved it to a implementation file, and placed the the prototype in a template class. Now I am get...
[18 replies] Last: I appreciate everyone's input. Definitely helps, thank you. (by stoneJax)
undefined reference to function error
 
I made a data saving class called SaveStream that just saves variables to a chosen file and labels them so you can retrieve them. The problem is I haven’t eve...
[10 replies] Last: Can I include the .cpp file in the .h file instead of the other way ar... (by highwayman)
by jhartc
making a grid of a vector
 
I have a vector, let us call it x. I want to make a grid of points between 1 and a variable, let us call the variable xm. How can I make a grid between 1 and ...
[7 replies] Last: #include <iostream> #include <vector> int main() { int nump = 100; ... (by lastchance)
by xoox
Largest digit in four variables inputted by the user
 
Trying to solve basic programming problem (logic based). finding the largest digit in four variables. i have done the program w/ several inputs but when it co...
[4 replies] Last: he changed other stuff. Read it again. line 9 is your problem descr... (by jonnin)
indexOfLowestTemp identifier not returning true index of lowest temp found.
 
I am developing an Object-oriented program using an UML diagram. The assignment asks to use an array of objects with size 7, and to input data for "weekDay", "h...
[5 replies] Last: In other words: the indexOfHighestTemp reports the correct index is ... (by keskiverto)
random numbers - long double
 
Greetings, another question: I would like to sample random numbers of type long double. Right now, I am drawing double numbers within the interval (a,b) ...
[1 reply] : I'm guessing you want the generated numbers to be long doubles, instea... (by Albatross)
by Avex
Making a grid using nested for-loops
 
Hello everyone! For a project, I have to make a simple C++ program that makes a grid, but I cannot use arrays for this project; I need to use nested for loops i...
[4 replies] Last: Thank you both for the help! (by Avex)
by euan
Not understanding Compiling faults
 
I am trying to run this program and do not understand why it will not run. I am getting 'Dog::age' is uninitialized and 'Dog::weight' is uninitialized. thank...
[7 replies] Last: Thanks everyone for the help. (by euan)
double vs long double machine accuracy
 
Greetings guys, I have a question to the machine accuracy of long double. First of all, using cout<< sizeof(long double); I figured out that long doub...
[3 replies] Last: if your compiler lets you get to whatever the largest thing the FPU us... (by jonnin)
Password and Username
 
Three Steps To Establish A Concept With Regards To Your Online Printing Projects Thomas Alva Edison was born on february 11th, 1847 in Milan, Ohio, to Sam Edis...
[6 replies] Last: Hey, sorry I couldn't post back on this one as soon as I would have li... (by Duthomhas)
by Eto
Turn hexadecimal strings to decimal integer value
 
Write a function in C++ that receives a string containing a 32-bit hexadecimal integer. The function must return the string's integer value in decimal form Do...
[7 replies] Last: hex has a direct conversion to binary, so you can digit by digit do a ... (by jonnin)
Account Savings using classes
 
I'm having trouble onto how I can deposit and withdraw money correctly and show the total money in bank account 1. #include <iostream> using namespace st...
[1 reply] : a basic idea void account::deposit(double amount){ this->total_mone... (by ne555)
by hbcpp
Building C++ libraries/Sdk's
 
I am trying to create a program that takes a local file and upload to a cloud account. So far I have 2 SDK's, from Mediafire and Mega https://github.com/M...
[19 replies] Last: I really thank you @Furry Guy, I am really needing some guidance. I h... (by hbcpp)
by Bopaki
Now I am getting this error when compiling
 
I guess there is something wrong with the setup in the IDE Compiling single file... -------- - Filename: C:\Documents and Settings\ALISON STUDENT\My Doc...
[2 replies] Last: Some possible causes of trouble. 1. You're already running writebackwa... (by salem c)
September 2019 Pages: 1... 10111213
  Archived months: [aug2019] [oct2019]

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