Beginners - March 2013 (Page 64)

error at main function
 
Here is the code that I am getting the error at: int main() { int const N = 10; int a, b; int flow ={1,2,3,4,5,6,7,8,9,10}; display(flow, N); cout << "Wh...
[2 replies] Last: It could be. And you can put int const, the order does not matter. (by firedraco)
Compsci II HW #2
 
My problem is that I need to run the program 5 times but it wont repeat even though i have a for loop in my main #include<iostream> #include<string> ...
[no replies]
Compsci II HW #1
 
Problem: The queen on the ACSL chess board is the most versatile piece. It can move at most N cells (where N is determined at the start of each game) in the fo...
[no replies]
for loops help please!
 
This is the problem I am trying to figure out: A student wants to be able to figure out their average in each of their classes. Each class has a different n...
[4 replies] Last: Awesome thank you very much (by AdmiralAxtell)
typeid of enumerator
 
hello i am reading about enumeration and i was trying this example using "Visual C++ 2012": enum Suit {Clubs, Diamonds, Hearts, Spades}; cout<<typeid(Suit::Di...
[3 replies] Last: I wonder what would happen if you did this: enum Suit : char {Clubs,... (by Stewbond)
Change content/line of text in a File
 
Hello, I want to change a line of text/content in a text file. There are many options, like copy the entire content of the file to a temporary file, seek the co...
[1 reply] : typedef struct { char fname['\n']; char insertion['\n... (by cire)
Need help with vectors and arrays
 
I am in need of assistance with a homework assignment where I have to write a program that prints out a bank statement .The program input is a sequence of trans...
[1 reply] : You didn't explain what your problem is. Not too many people are goin... (by Stewbond)
by abry
CHAR* STACK/QUEUE PROBLEM
 
In my code, I cannot seem to push other string values other than the last value I have input. I know it's just a problem with storing string/char* in my stack/q...
[1 reply] : A pointer holds a memory address. You are pushing the same memory add... (by cire)
by EeAA
exhaustive search
 
Can someone give me a general idea on how to setup pseudo code for an exhaustive search algorithm to find n number subsets with not connected edges? The undi...
[1 reply] : > I tend to think more like a human where I need to think as a compute... (by ne555)
First Battleship Program
 
Hey guys I just wanted to share my first battleship program. It is pretty basic but I am new to c++. If you guys have any recommendations on things to fix or cl...
[no replies]
Code errors
 
"fraction.h" #ifndef FRACTION_H #define FRACTION_H #include <QString> class Fraction { public: //Sets the numurator of the fraction and the denominato...
[4 replies] Last: Thanks for the initial help, will give it a shot. Appreciate the poin... (by Anonymous Anonymous)
Help with this code? (Complete Beginner)
 
Hello all. I am new to programming (just started a class in college), and I am having a problem getting this program to function correctly. Our task was to con...
[4 replies] Last: As L B pointed out, the function doesn't need C as a parameter. The w... (by Chervil)
Loops
 
How would I create a program that would find the largest and the smallest integer in a series?
[2 replies] Last: or more simply: float MaxRange(float arr , int size) { float high... (by Stewbond)
how to make triangle with number?
 
i Write a program to print a triangle, star (*) is change with number from the largest possible number to 01 (reversed) but with my code it's doesnt work this...
[no replies]
Can someone explain the difference between pass by reference and pass by value?
 
Pass By Reference VS Pass By Value in C++ can we use both in return type functions ex int and void? I am so confused any help would help tremendously! th...
[4 replies] Last: In general, I stick with return over reference, but it depends on what... (by Stewbond)
Help starting this program?
 
cc
[1 reply] : cplusplus.com/doc/tutorial (by chipp)
Baseball Roster Help?
 
Hey all, I'm trying to make a program to have a baseball roster which can be edited and adjusted based on user input. Everything works 100% fine except for one ...
[3 replies] Last: Ah, fixed it. Just some stuff needed to be moved around. Thanks. (by oobilator)
Help with calling header files in C++
 
This is a program that I have already written. What I need to do is modify my switch statement so it calls the header files instead of stating what the user cho...
[3 replies] Last: Example: switch (decision) { case 1: cas... (by Chervil)
function not showing any input
 
I need to create Three classes , namely: 1. Motorbikes 2. Vans 3. Trucks all of them have the following: private: string vehicleColour; int noOfWheels;...
[2 replies] Last: in my main program i call the toString() using cout. Thanx for your he... (by firstTym)
Erasing string values, string subscript out of range.
 
Hey people. I don't quite understand how I'm getting the error, Expression: string subcript out of range. #include <iostream> #include <string> using s...
[7 replies] Last: Thanks Chervil and Cubbi, it's working fine now =). I included this as... (by Olysold)
March 2013 Pages: 1... 6263646566... 87
  Archived months: [feb2013] [apr2013]

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