General C++ Programming - March 2013 (Page 39)

Structs problem
 
I think i am getting confused with passing structs and functions all in the same When I run through the program (it compiles), the functions that add coins d...
[1 reply] : I'm a little confused regarding what these functions are supposed to... (by Stewbond)
by ET21
ifstream and outside file in a function
 
The whole basis of this program is to do basic math operations using functions (add, sub, etc). What I'm having issues with is trying to set up the function to ...
[14 replies] Last: I'm still getting the same errors even after changing that. I don't kn... (by cardinals1968)
Hi;About, C4716 Error: Must return a value
 
hi i have a homework the question is (Account Class) Create an Account class that a bank might use to represent customers’ bank accounts. Include a data memb...
[7 replies] Last: On line 16 you declare that it exists, but you do not give it any valu... (by LB)
count the numbers below the average
 
Hello everyone need some help. I have loaded and 1d array from a .dat file, calculated the average of all the numbers. Now I need to count every number in th...
[2 replies] Last: Computergeek01 your suggestion did not work still have the same output... (by ghostcode)
Roguelike Item creationg and optimization
 
I'm creating a roguelike/ cave exploration game, and I've created a lot of it, but I am having problems with item creation. The item is supposed to be the '*'. ...
[1 reply] : void Draw() { for(int a = 0; a < MapSizeY; a++) { ... (by kyranstar)
Linker Error? (VS 2012)
 
Hello all, I'm trying to use Boost with Visual Studios 2012. The binaries have been built, but when I try to run a sample program (shown below): #...
[2 replies] Last: Thanks for the input LB, but I solved the problem. If this happens t... (by xanimeangiex)
by Skynet
How can I break up a word?
 
I was wondering if there is a way for me to break up a word compare it one character at a time and change it according to a real word like if you have cat and d...
[1 reply] : Try it! Show us your results. Then someone may help you. (by tcs)
by high
how can i make this program enter this file (arguments) and its content from screen (not as command line arguments)
 
actually, the below program is a console program, and needs command line arguments, that are as files i'm entering from (project properties-Visual studio c++ 20...
[1 reply] : Despite your horrible indentation (use C-Program please to forma... (by tcs)
Find duplicates before inserting into doubly linked list
 
I have a text file that needs to be read by command line arguments. The text are all numbers and can have multiple numbers on one line separated by a space. I c...
[2 replies] Last: ... or read a number at a time ... (by tcs)
binary function compile error
 
Hi, I wrote a binary function based on existing template: template <class T> struct percentage : binary_function <T,T,double> { double operator() (con...
[5 replies] Last: Thanks for the replies. I added std:: and that works. Just forgot this... (by dekeenfrance)
How to make my own cin from istream
 
I want to make an object of the class std::istream and manually make it point to the console screen, just like std::cin. I want to do this because I'm planni...
[9 replies] Last: I've just been working with C++ long enough. If you want to learn all ... (by Cubbi)
by den213
Stack and queue programs
 
My professor gave us an assignment. Create a stack program and a separate queue program. The problem is, I can't think what kind of program to create that uses ...
[4 replies] Last: We need to create a lot of programs using this stack and queues. May... (by tcs)
Character movement
 
I know this question has been asked many times in different ways. How can I move a character around a 2D map? After some research and a bunch of work I made a f...
[5 replies] Last: Ok, haha, I solved this myself :) The problem was that the line curr... (by Vidminas)
by tupher
How can i change the font and the font size in console?
 
How can i change the font and the font size in console?
[no replies]
Really large prime numbers
 
I am having trouble trying to check if a number (greater than 10^50) is prime or not... the general algorathm for checking it by taking modulus is very ineffec...
[5 replies] Last: thanx guys.. that was really helpful.. (by saurabhkoolkumar)
C code to C++
 
I need to use C++ codes but this code I have is currently a C code. What is the C++ code version of this? without using " printf( ) "
[4 replies] Last: Well, without using std::reverse, and using std::stack: #include <i... (by ajh32)
Help With Binary Search Tree
 
Hello all, this is the first time I've posted in this forum so i'll get straight to the point. I'm trying to create a template binary search tree and I'm gettin...
[2 replies] Last: Thanks so much, been trying to figure out what was going on for about ... (by Duffles22)
by dahin
How can insert value in structure vector?
 
Here I have given my sample code, but it gave error. How can insert value in structure vector? struct Hough_Transform_3D_Accumulator { long int i; long...
[5 replies] Last: - That method would also work. (by thejman250)
Please Help!!
 
The program should create two integer variables for the temperature in Celsius and Fahrenheit. Initialize the temperature to 100 degrees Celsius. In a loop, dec...
[1 reply] : adjust it as you want,,, #include <iostream> using namespace std; ... (by joneele)
Singly linked list of structs (1,2)
 
Hey everyone, I want to make a singly linked list of structs with a custom datatype. Sadly, I dont think I understand either. #include <iostream> using na...
[37 replies] Last: [quote=oudavid1]the friend function of ostream It's a friend function ... (by LB)
March 2013 Pages: 1... 3738394041... 51
  Archived months: [feb2013] [apr2013]

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