Beginners - October 2011 (Page 4)

Power Function
 
I'm writing a Program that takes x and raises it to the power of y. I'm also trying to make and call my own function called mypow(). This is what I have so far:...
[1 reply] : It looks you errors are int mypow(int, int); { That brace is n... (by Maese909)
by Dimpy
need help urgent!!! stack of integer arrays
 
Hi, I have to construct stacks of 1-D integer array of length 7 and info has to be read from input file and results must be printed out in output file. The op...
[no replies]
Is this an error in the textbook?
 
I don't want to replicate the whole code but there's an example in the book I'm reading. The book is "Problem Solving with C++" by Walter Savitch and the page i...
[2 replies] Last: "Problem Solving with C++" by Walter Savitch Which edition? They ma... (by shacktar)
please help me on this...
 
I am currently taking a course on C++ and struggling with it so bad. Can anybody help me out with this program? I suppose to calculate a time difference, but my...
[6 replies] Last: Thank you so much! I'll see to it. Good night! :) (by narutochan)
Snake programming using Classes
 
I want to practice on using classes to program, I feel that using the OOP approach when programming anything is very important to learn C++. I am trying to make...
[1 reply] : I have a good book that would probably help you a lot -- "The Object-O... (by strongdrink)
Operator Overloading Problem. Variable is not changed
 
I using Operator Overloading + to add a Date object with int num. The Date will be modified. But when I test it, it's not change at all File DateAndTime.h ...
[2 replies] Last: Thank you very much. The link you gave me is an excellent explanation. (by cuoilennaocacban)
Menu linking Compilie error :(
 
Hi im trying to get this to compile im try to make a menu this is my code but it wont work //main.cpp #include <iostream> #include "Menu.h" using...
[4 replies] Last: ok do you see this code nessary as i need to create a menu for a catal... (by Marcello)
Question about interest...
 
hello, My question might not be directly relevant to this forum, but I believe it is to a certain extent. I am a person who have been using computers for 11 ...
[1 reply] : Suggestion: Talk to your class mates. They will know more about these... (by Tytrin)
using const_cast (need explanation)
 
#include <iostream> using namespace std; int main() { const int a = 2; const int& b = a; const_cast<int&>(b) = 3; cout << b << endl << a;...
[2 replies] Last: how would I go to do that? get rid of the 'const' in front of a. S... (by Disch)
homework problem i have very little clue on - constructors and classes
 
ok all i am at a loss here and am in need of some major help. the homework problem is this: 1. Employee Class: Write a class named Employee that has the ...
[10 replies] Last: the code is in the post before the errors and i have no idea how to se... (by seawolfmoose)
editor and compilor
 
Hello, I took c my freshman year of college and plan to continue computer sciences after a year at a community college so i would like to try and learn c++ in ...
[2 replies] Last: To clarify some notation: 1. Code::Blocks is an IDE, or Integrated Dev... (by anonymous23323124)
Question about arrays
 
Hello, I am doing this program where I have an array of char type that is initialized with 20 characters Like so: const int SIZE = 20; char answers =...
[5 replies] Last: Okay, thanks for the help. I was able to complete the program :D (by illlojik)
Where am I going wrong?
 
Scenario: As you peruse various websites on the Internet, looking to create a banner for your new business, you notice that many places charge you by the let...
[1 reply] : check finalCost to see where it should be calculated. (by EricDu)
Logical Operators
 
Hi all, Are the following statements the same? int x(5); if((x == 4) || (x == 30)) ++x; and int x(5); if(x == (4 || 30)) ++x; ...
[1 reply] : Of course not. || takes two boolean operands and evaluates to true if ... (by Athar)
header file issue
 
hello all, back again with another homework issue. i have a homework problem with classes, and the instructor wants parts of the program as header files. i elec...
[2 replies] Last: thanks...that took care of two out of three, the last being a nameing ... (by seawolfmoose)
Arrays Homework assistance
 
Hello again all. I've been working on this program for a couple of weeks but I still cannot get to work like the homework requires. The assignment is as ...
[1 reply] : #include <iostream> #include <iomanip> #include <string> #include <fs... (by MrBackpack)
converting upper to lower case
 
i am trying to convert the upper case string to lower through the following code: #include<iostream> #include<ctype.h> using namespace std; int main() ...
[9 replies] Last: I was thinking that the null character is always going to be the last ... (by Maese909)
Token Problems
 
I'm currently trying to learn about using Tokens in basic programs but having a tough time figuring them out. The book I'm learning from is kind of confusing me...
[2 replies] Last: I was under the assumption in my Token get_token(); was implementi... (by Trashcan42)
expected primary-expression before "const" c++
 
Trying to figure out why i am getting this error: #include <iostream> #include <iomanip> using namespace std; int main () { ...
[4 replies] Last: output is good, any suggestions on the calculations? (by Nickolas Baker)
use variable in variable name
 
Is it possible to have a variable n, and spawn a new object as onbjectn? For example: struct block { int x, y, z, size, rotation, velocity; }; int nofblock...
[1 reply] : What you're looking for are arrays/vectors. #include <vector> [...] ... (by Athar)
October 2011 Pages: 123456... 59
  Archived months: [sep2011] [nov2011]

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