Beginners - April 2017 (Page 31)

by Ponvo
Storing and converting bases using recursion and exception handling.
 
Hey guys I have an assignment due in 3 days(Wednesday). The program is supposed to take a number from any base and be able to display it in any base as well.The...
[5 replies] Last: Big thank you to lastchance!!! I made the whole thing :D. (by Ponvo)
help!!!!!!! undefined reference to
 
i'm trying to compile and run my code but it gives me the error undefined reference to `main_savitch_15::graph<int>::add_vertex(int const&)'.... i can't seem to...
[3 replies] Last: Hi, ricciopasticcio. The long, boring but utterly useful guide to the ... (by Enoizat)
figuring out if letter is uppercase or lowercase
 
So i am doing a code in where i enter in initials and from the initials i entered, the code will say if the letter is uppercase or lowercase. I know i would pos...
[3 replies] Last: There are also library functions that will help: #include <cctype>... (by AbstractionAnon)
creating a function with function as a argument
 
I have to create a program with sorting algorithms. The program will have to do all the algorithms in one go. I was thinking of using this code for all of algor...
[7 replies] Last: That's great. If a function takes 3 arguments do I make another functi... (by kubanm3)
Polish Notation
 
How to check that a Postfix notation is valid or not?For example :a+b is wrong postfix Thanks in advance.
[1 reply] : Use a stack. Push numbers until you find an operator. Once you find... (by mbozzi)
Simple addition funtcion
 
I'm new to functions and I'm trying to add 2 numbers. Where am I going wrong? #include <iostream> #include <iomanip> #include <cmath> using namespace...
[2 replies] Last: #include <iostream> using namespace std; int add(int, int); int ma... (by closed account 48T7M4Gy)
trouble with getline, fin, 2d array, for loop
 
Hi all, first time poster here. My problem is either my output file is repeating the same line for every array or the array is not incrementing correctly with e...
[5 replies] Last: cout << "Enter the number of students: "; cin >> num_studen... (by jlb)
Recursion on main
 
First of all, during this post keep in mind that when I am referring to a program or a code it means that the program is only able to do 1 thing or function or ...
[7 replies] Last: And don't forget that main() is a special function that can call other... (by jlb)
simple array output overloading question.
 
In my cmpt notes, there is array cout overloaded, ostream. Its job is to just simply print an array. They used for loop to print the array except the last eleme...
[6 replies] Last: coder777 - yeah, i think you're right, that's what it could be ... edi... (by gunnerfunner)
Ofstream/Ifstream help
 
Hello all, I have finished my program, but when I try to use ofstream and ifstream in order to print my output onto a different file, I either get errors or jus...
[1 reply] : Hello ru12adis, I have not tested your program yet and I do not know ... (by Handy Andy)
other version of cout
 
...this must be the dumbest question but If we need using namespace std; to access the standard version of cout then what does the other version of...
[3 replies] Last: Unless someone writes their own cout function std::cout is an std::... (by gunnerfunner)
by Mvpg
A class using it's own created objects by function parameters
 
I was wondering if it's normal to create a function inside a class that uses it's own made objects. For example: Entity.cpp void Entity::playerAttack(Entity ...
[1 reply] : Non-static member functions have to be invoked by a calling class obje... (by gunnerfunner)
Smart pointer to dynamically allocate an array
 
Hello! I recently was introduced to use smart pointer to dynamically allocate an array using "unique_ptr<int > array(new int )" All is going well until I need ...
[3 replies] Last: OP: the ctor for int's probably OK but in general prefer std::make_uni... (by gunnerfunner)
Function calling functions
 
How do I return true into the other functionside,and how can I call functions within functions. These are the instructions that I'm working with: Write a f...
[10 replies] Last: Thank you so much everyone! I was able to finish the entire assignment... (by esokoletsky)
Help With C++ Homework (Loops)
 
Hello, I am having trouble getting my program to output the correct information, it runs but not with the correct information. These are the directions, I have ...
[7 replies] Last: > What kind of loop should I use (for, while, do) to cause my program ... (by JLBorges)
by osur
Linked List and Class Inheritance
 
Good day, I have been assigned a project about polymorphism. The idea is that there is a linked list with the node data type containing one of four classes. The...
[1 reply] : Hi, A few things: I don't think you should have a generic class as o... (by TheIdeasMan)
Structure Declaration
 
Hello everyone, This is my first post so please bear with me. I am struggling to understand the structure declaration in the following piece of code. This cod...
[3 replies] Last: Ill go a tiny bit deeper. static Route *cRoute; //Help needed ... (by jonnin)
negative struct output
 
I'm trying to write a general struct practice code, but the output is always negative. can anyone spot what I'm doing wrong? #include <iostream> using na...
[2 replies] Last: JayhawkZombie, thank you so much, I don't know how I overlooked that. ... (by mountainsloth)
by Sentoo
Arrays vs Arguments
 
Hi there, I am currently lost on how to fix my code for this assignment. Any help will greatly be appreciated! Write a function called fillArray that will...
[5 replies] Last: Thank you so much for the help. The program is working as intended. (by Sentoo)
How to draw data structures?
 
So in our class our professor prefers if we draw out our data structures before diving into coding. If anybody knows a resource that elaborates such things I wo...
[1 reply] : look at a program called graphviz. You will thank me once you need ... (by jonnin)
April 2017 Pages: 1... 293031323334
  Archived months: [mar2017] [may2017]

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