General C++ Programming - November 2012 (Page 44)

problem functions and structure
 
i have always error does not appear and i dont know what is the way to avoid this is it error C2447: '{' : missing function header (old-style formal list?) ...
[5 replies] Last: thank you for correcting my bad mistakes (by alsatrawi)
by PBC1
Pointers
 
In the statements below, the occurrences of strings of * is new syntax for me. Can someone explain it? Thank you. char*** studentNames; // declarati...
[5 replies] Last: I think it's easier to understand as a pointer to a pointer to a point... (by ResidentBiscuit)
Fraction Help!
 
I am writing a program with Visual Basic 2010 C++. I have almost finished but I can't figure out my logic for the Euclidean algorithm. Here is the code I hav...
[12 replies] Last: The only fractions that work are the ones that the numerator is the gc... (by EMetalmulishaH)
by Triea
How can I make this program neater?
 
For one of my assignments, I needed to make an RPN calculator by using linked lists. I showed my project to my teacher looking for feed back, but he simply said...
[1 reply] : You could start by removing the superfluous #include s and using nam... (by hanst99)
ANSI escape code, from Argument
 
I am trying to write a program that takes a string from the user and formats the CLI text using an ANSI escape code. Below is the code I have got closest to wor...
[3 replies] Last: Thank you very much, I have adapted the script and simplified it co... (by dm14v07)
by BandK
Sort problem :(
 
I have struct like this...User write price and name and each element... First i make new float array and in this array i put unsorted prieces from linked list....
[1 reply] : I have struct like this...User write price and name and each element.... (by kbw)
Error in code, need help fixing
 
Doing a project but can not get it to compile.. Can't figure out what my errors are... here is my code #include<iostream> 2 #include<string> 3 #includ...
[3 replies] Last: did_you_hit is the name of your method. At lines 36 and 40, you app... (by MikeyBoy)
Passing Int to be Displayed Properly
 
Class Shape { Area = x +x ; cout <<"Area is" <<Area; }; This results returns a value 24. But when I try to use it in the main method int mai...
[8 replies] Last: Is there any place I can view codes written by others to learn from... (by AbstractionAnon)
Problem with Template-Application
 
Hey Guys, here i am again :) I have to declare a template class or template struct in a header, so i can use it later only with an include. Thats my de...
[5 replies] Last: The Problem sits 30cm from the Screen, like each time :D I modified t... (by trialanderror usually)
variables inside namespace
 
Dear formum members, I have a rather strange problem when trying to define variables inside a namespace. My original idea was to use those variable names and i...
[16 replies] Last: They are different tools for different tasks. Sometimes I encounter C... (by Moschops)
void-pointer problem
 
Hey guys, i got a question again :) I am working with an C API wich i wanna encapsulate in C++ classes (It is about an OPC UA client, but that is minor ma...
[4 replies] Last: Oh man, thanks for the broad hint :D. Of course is that the solution.... (by trialanderror usually)
error- (did you forget '&')
 
#include<iostream> 2 #include<string> 3 #include"Random.h" 4 using namespace std; 5 6 class Weapon{ 7 public: 8 int hit_chance; 9 i...
[4 replies] Last: These are really simple errors. I think you should go read a few c++ t... (by Angeljruiz)
by iky
how to use the bool operator??
 
im having trouble using the bool operator in my program. for my program i have to use a bool function to determine whether three integers that represent three t...
[5 replies] Last: got it. thanks. (by iky)
by iky
need help with my program please!!!
 
ok so for this program i have to make a main program that calls four different functions. the introduction function doesn't return anything and it only prints w...
[2 replies] Last: the "two are the same and one is smaller" part in the output comes aft... (by iky)
game help
 
writing a game involving two knights jousting... My main function has to ask 10 questions (5 about each night), then be able to display the functions then the ...
[5 replies] Last: Knight k1; cout << "Knights name? " << endl; cin >> k1.name; ... (by Angeljruiz)
How to avoid circulae dependencies
 
Hey all I'm trying to write a program like so: I have a cpp file I waould like to run and create objects of 2 classes. Each class has a field of the other ...
[1 reply] : Circular dependencies indicate a design flaw. If two classes require e... (by pogrady)
Construct a Square
 
How to make it run? // A program whose input is a single integer, and which will create a file containing a " square" // The square with alternating sym...
[2 replies] Last: line 23-33, is valid my problem is how to show rows, or column becaus... (by princesslumy)
Copy Constructor in a class
 
Hey guys totally new to c++ but have a question:) I need to create a quadratic equation solver with set coefficients.. so far i have created a class. Im having...
[7 replies] Last: but the result it returns in the terminal is "-nan" NaN usually stan... (by Catfish2)
calling a value from another method
 
if i have void first_root() { Root1=(-b+sqrt(d))/(2*a); } and i want to get the value for root one and print it in another void how is this po...
[1 reply] : Sounds like you need the function first_root to return a value. T... (by Moschops)
About forward_list preallocation
 
Hi all, This topic follows a discussion on StackOverflow: http://stackoverflow.com/questions/10674289/is-there-an-equivalent-of-vectorreserve-for-an-stdlist...
[4 replies] Last: > why are you writing your loops like that? Like what? Aren't those ... (by Terminux)
November 2012 Pages: 1... 4243444546... 51
  Archived months: [oct2012] [dec2012]

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