Beginners - March 2014 (Page 73)

Pointers Swap
 
#include <iostream> #include <cstdlib> using namespace std; void swapNum(int *q, int *p) { int temp; temp = *q; *q = *p; *p = temp; } void ...
[3 replies] Last: Firstly, because the for() looping condition is k < size/2 only th... (by Catfish666)
Overloading Contructors
 
I'm creating Bio's for a couple of characters in a game of mine, I'm just starting out learning classes from a course I'm on... I'm getting an error message ...
[2 replies] Last: I see.. Thank you! I got it working now, I just swapped a couple of... (by superdaz83)
syntax error
 
For some reason I'm getting the error "nullptr" undeclared identifier? #include <iostream> int main() { int a(20); int* pnbr(nullptr); std::cout << "the ...
[2 replies] Last: Ah thanks for that info! (by superdaz83)
BST Insertion
 
hi, I'm having a problem in my binary search tree program first of all, here's my class for binary tree and inside it is a class for each node (Note: It's n...
[1 reply] : Code outside of BST should not care about the internals of BST, so no ... (by cire)
Fraction's
 
Hi, I have a problem with my assignment in c++, i did first part but i have a problem with second part where I need to reduce fraction from part 1 and return it...
[no replies]
Pointer type cast?
 
Lets say I have unsigned long * MyPt; // long=4 bytes I need to create a pointer that is type short=1byte and points to the Nth byte in MyPt? Then ...
[1 reply] : the cast you're looking for is reinterpret_cast: http://en.cppreferenc... (by Cubbi)
by fg109
inheritance, nested classes, templates?
 
I have an assignment for class where I have to implement a linked list and then create the derived classes for stack and queue. The linked list works, but I'm ...
[no replies]
Functions
 
I am writing a program that lets a user enter a length in feet and inches and converts it into meters and centimeters. What is wrong with my code and how can I ...
[6 replies] Last: Thanks to everyone. My mistake if I didn't make it clear. I will use a... (by faust058)
How to make 2 sets, the program must output the Cartesian product of their respective elements
 
So my question is how do i make 2 sets? if these are my two set moon S sun S stars run S walk S stop S stand
[no replies]
by dcradu
checking if a polygon is convex
 
I have to do a Polygon class that has a function which verifies if the polygon is convex . the class looks like this. the number of points that make the polygon...
[2 replies] Last: thanks very much (by dcradu)
by dnulho
Rebuilding an array
 
I am working on a project that starts by building an array. I want to have the option later to rebuild and change that array but I'm getting runtime errors that...
[2 replies] Last: Thank you, problem solved. (by dnulho)
bubble, insertion, selection sort program
 
my out put currently is lab03 the original array has been reset to: 20 40 10 30 SORTING - Bubble Sort Ascending - O(n2) algorithm 20 10 40 30 ...
[3 replies] Last: This is what your output should look like: Lab03 The original array ... (by Smac89)
Why, when I try to get todays date, do I get yesterday's date?
 
I saw some warning in my compiler (Visual studio 2012) that localtime is unsafe but I don't think I should use localtime_s because it's non-standard c++ from wh...
[2 replies] Last: Ahhhh. Ok thanks. (by theperson)
MAJOR Problem!
 
Hi! I've reading the tutorial on programming with DirectX. I was reading http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-1 and then I did all what he sa...
[no replies]
Comparing Characters
 
Hi, I'm about to build a binary search tree using c++ with the operations insert, search, and traversals (inorder, preorder, postorder) before I start making...
[1 reply] : Why not try it out? http://ideone.com/XQFBJG (by MiiNiPaa)
by Huppa
Need help finding the syntax (parse) error
 
//temp_conversion.cpp #include <iostream.h> #include <conio.h> #include <iomanip.h> int main() { int fah, cal; char type, ans; //type of conversion & an...
[4 replies] Last: When asking for help with error messgaes, PLEASE INCLUDE THE ERROR MES... (by AbstractionAnon)
by Pg0715
what am i missing really lost in programming please help
 
So for the homework I need to compile and test a C++ program to present a user with a selection of movies to buy from. The user can choose from sci-fi, action, ...
[8 replies] Last: Sometimes goto is the best way to solve your problems. I use it for s... (by wildblue)
by enemy
Is C++ case sensiteive?
 
Hello! Please, is c++ case sensitive? Are there exceptions? Many thnanks!!!
[7 replies] Last: STACKSTR_H is just a name that you use for the include guard. You coul... (by Peter87)
Nested Loops
 
A bowling team consists of five players. Each player bowls three games. Write a C program that uses a nested loop to enter each players individual scores and ...
[2 replies] Last: Seems like bowler should be an int not a char ? If you start bowl... (by wildblue)
by Nukem
Yes No Loop
 
Having an issue when user types more than one letter in my do while loop. It repeats "Would you like to make another calculation? (Y/N): " multiple times. How d...
[3 replies] Last: I posted this already on a different thread where you pointed someone ... (by wildblue)
March 2014 Pages: 1... 7172737475... 79
  Archived months: [feb2014] [apr2014]

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