Beginners - July 2016 (Page 5)

Integer o word
 
Hi, I am stuck of thinking how to convert integers to words using arrays. I cannot figure it out. Any help would be highly appreciated. I would like to write a...
[11 replies] Last: All you do is expand what I have given you so that the number is broke... (by closed account 48T7M4Gy)
Inserting objects into BST
 
I have a class called Shows: Show(const Date& date, const Time& time, int showNumber, string title, string genre); I also have a Template BST <T> class a...
[1 reply] : Line 3 of your snippet implies that Show has overloaded the < operator... (by AbstractionAnon)
Why am i getting -nan(ind)
 
How can i fix that error? float returnFallenDistance (float gravity, float height, float thrustForce, float mass, time_t elapsedTime) { std::cout << ...
[8 replies] Last: Using the input you provided I get the following output: ------------... (by jlb)
Unable to statically link to GLFW lib, but no problems dynamically, why?
 
I'm using GLFW for creating a gl context in C++. Would anybody know why when using GCC and mingw-w64, I'm unable to statically link to their lib, and instead I ...
[4 replies] Last: There are advantages and disadvantages to both dynamic and static link... (by LB)
How can I return to Main from a constructor?
 
I've got a constructor: // renderer.h Renderer(); // renderer.cpp Renderer::Renderer() { // Code } Is there any way I can have the constructor retu...
[3 replies] Last: Yup, the constructor will return to where it was called from. Just ... (by MikeyBoy)
by xymon
I can't paste the header file into the microsoft visual 2013 file
 
Hey, in the book: programming principles and practice using c++ of Bjarne Stoustroup he uses the std_lib_faciltiies header-file to integrate several features a...
[7 replies] Last: You do not need to copy the header file to the compiler headers. Just ... (by coder777)
Special Tree Problem
 
I am creating a combination of trinary and binary trees. At level=0, you have the root of course. Then at level=1, you have 3 nodes. At level=2, you have 2 nod...
[8 replies] Last: @Necip Yes, that looks good. The 'forward declaration' is not needed. ... (by coder777)
by nappa
string into double
 
I've been working on some code to convert a string into a double but I am not allowed to use c_string. I have no idea where to start.I have tried stod like many...
[8 replies] Last: Good to hear :) (by Naughty Albatross)
Min and Max of an Array
 
I have made a program that makes an array of 25 random number between 3 and 7. It prints it, and also the reverse. I also have attempted to return the min and m...
[11 replies] Last: http://www.cplusplus.com/forum/beginner/194951/ (by closed account 48T7M4Gy)
Bubble sort using array of structures
 
i have an assignment in class and we have to take a program we coded and re-arrange it so it puts the output in descending order by units sold. This is the code...
[1 reply] : Hi, Firstly please use code tags www.cplusplus.com/articles/jEywvCM9/... (by shadder)
Old Chinese rice problem
 
Hello everyone. I wrote this going through the c++ guys book. It works fine but when I try to plug in anything above 2 billion the program goes into some ki...
[3 replies] Last: Maybe try long, or long long instead of int. Unfortunately there is al... (by closed account 48T7M4Gy)
by nappa
Finding names
 
Im trying to write a program that can gather a users full name and remove any extra spaces. then display the name back with only one space and the full name re...
[6 replies] Last: how would I do that? If you're referring to using a stringstream to... (by jlb)
Determining value
 
Hey guys! please help me on this drill. Determine the value of each item below and design a program for each item that will display the computed output. C...
[3 replies] Last: Hi, Can you show us your code? (by Naughty Albatross)
C++ for CPLEX
 
Hi everyone I am a student at the university and working on my thesis in linear programming. My supervisor told me I must write my mathematical model in C++...
[1 reply] : http://www.cplusplus.com/doc/ (by closed account 48T7M4Gy)
C++ declaring char for grade input using if then else statements
 
Hello, I have to make code using if,then and else statements for grade input. If the user inputs a,b,c, in both caps or lower case I need to cout "pass". ...
[2 replies] Last: This sounds like homework. (by connorhperkins)
Help Please
 
Still having some trouble with my assignment. This is what I have so far. I have getting these errors: Error C2447: '{' : missing function header (old-s...
[1 reply] : You've already been told how to fix most of these errors: Line 16: g... (by AbstractionAnon)
c++ use data in a vector as menu option
 
I have a .txt file that contains 3 lines: Food Drinks Other I read in that file: ifstream inFile(menu.txt); if(!inFile) { cout << ...
[11 replies] Last: MENU is a collection class (vector) of MenuItems. Each MenuItem consis... (by AbstractionAnon)
time delay function
 
This function has been using in the old code. Now, that we put a program in the new hardware we have a problem with data collection that is offset by some numbe...
[2 replies] Last: is there a good reason to choose std::chrono vs Sleep() function? htt... (by SteveOshnall)
writing bigger programs?
 
So here I am almost 3 years doing programming on and off and 5/6 months of c++ I just finished reading Alex Allain's book which I must say I wouldn't call it gr...
[1 reply] : Hi. After I had learned all the fundamentals of C++ and console progra... (by Tom56785)
July 2016 Pages: 1... 34567... 30
  Archived months: [jun2016] [aug2016]

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