General C++ Programming - March 2010 (Page 5)

by kfgoh
board game AI
 
Hi I am creating a board game for 2 players. Each player takes turn to place a piece on the grid. The objective is to circle-up the opponent's pieces with you...
[2 replies] Last: __*___ _*#*__ _*##*_ __**__ Is this a valid way to circle someth... (by hamsterman)
Recursive Sequential Search function
 
Hi Guyz am struggling with this code... which i think the problem is with the main function but i can figure it out am using the DevC++ compiler. #include<...
[2 replies] Last: Did you close the }-brackets at the end of main? Why is there a int... (by attaboy)
Default value for vector
 
hi, i have problems with default value for vector wich type is struct s { int a; int b; } void somefunction(int a, vector<s> & myVector = ??? ); ...
[3 replies] Last: That will work, but see http://www.cplusplus.com/forum/articles/201... (by jsmith)
by juanix
Friend function in separate files
 
Hello, I need to use friend functions into two classes in separate files. I compiled and run the following sample program without problems but when I try to ...
[2 replies] Last: Just out of curiosity... why does class Two know how to print class On... (by jsmith)
[Codefest] Manthan, Algo Intensive Coding Contest. Prizes worth
 
Codefest, in association with Codechef presents Manthan, an algorithm intensive programming contest, which is scheduled on 06:00 pm, Mar 28 IST. It is a 6 hour...
[no replies]
how to resue functions in c++
 
hi all i have function created in a.cc and a smilar function created in b.cc how do i make this as a single function, something like function resue, ...
[2 replies] Last: i think just copy and paste the function to one file.. (by EAStudent)
sum of an array
 
I have made this small program to help me add numbers and find the sum, it runs but no output.what could be the problem? // Program that uses a switch statem...
[6 replies] Last: @darkestfright sorry mr darkesfright.. i just use its existing cod... (by EAStudent)
empty out put.
 
#include <iostream> using namespace std; int main() { int i,scores ,max; cout <<"Enter 5 scores: " << " "; cin >> scores ; max = scores ; for (i=0;...
[5 replies] Last: Do not ever make main() function of type void, it is non standard. Ce... (by closed account 1yR4jE8b)
getting a seg. fault after Expression Tree is built
 
Hey everyone, I am converting a string to an Expression tree. I made a build function and it seems to work fine, but I get a seg fault for some reason. After ea...
[no replies]
getting a seg. fault after Expression Tree is built
 
Hey everyone, I am converting a string to an Expression tree. I made a build function and it seems to work fine, but I get a seg fault for some reason. After ea...
[no replies]
Update Window With New Info after Button Clicked
 
Hey all, I solved my previous issue with the linker problem, and figured out how to attach actions to my buttons. I know some of you aren't thrilled there, but ...
[no replies]
Table of subtraction
 
I am trying to create a subtraction table where you subtract the number of column from the number of row, and the answer appears within the table. For example i...
[3 replies] Last: may be this is ur problem void show () { int answer; cout... (by EAStudent)
horizontal display
 
Make a horizontal display of the arrays. #include <iostream> using namespace std; const char ROWS = 13; const char COLS = 4 ; const char LEVEL...
[2 replies] Last: How do I change the following code to display the arrays horizontally ... (by gnwillix88)
by Jvb182
Passing arrays to functions.
 
I've been working on programming a database using hash functions. Today I ran into a problem when trying to pass an array to a function and I was hoping someone...
[1 reply] : // Correct declaration: void Find( string Name, DoublyLinkedList<I... (by jsmith)
by bymaks
c++ APİ
 
hi. I've compiled with c + + powerpoint presentation on the desktop Kode How can I call. After you compile the code after pressing çalışırdıgımda enter a ...
[2 replies] Last: help (by bymaks)
Opening 2 Files Together And Comparing Them
 
Hello. I have a problem that I am frustrated with. I am writing a program that has to compare two separate files. If the strings in these files match, the outpu...
[18 replies] Last: Don't be sorry. It's not your fault. I just need some more perspective... (by sportsguy90)
How to check data type?
 
I'm writing a simple program which saves all its data to xml file. I've got a few different classes to save in it, but no idea how to differ them. I could ano...
[15 replies] Last: Still fine, knowing this I can make something to prevent such behaviou... (by Uriziel)
by gump
bit fields and .bin files...
 
I have some code I am using to take an object of a specific type (e.g., a char or an int) and, using a struct whose members are "unsigned"s of length 1. Exampl...
[3 replies] Last: Thanks, guys... Tried outputting in binary mode, however, got the s... (by gump)
create max, min, and avg functions
 
I am getting a little frustrated with this program. Im a beginner with a little c++ bg. The user has to make a choice to either find the max, min, or avg of a s...
[3 replies] Last: Never mind. I figured it out. Thank you very much for your help. (by jonesin4anime)
Can't get copy constructor to work in Linked List ADT...
 
Here is my members file: /////////////////////////////////////////////////////////////////////////////// #include<iostream> #include<fstream> #include "lin...
[2 replies] Last: In the copy constructor, you never use the otherlist argument. I gu... (by lloydchristmas759)
March 2010 Pages: 1... 34567... 23
  Archived months: [feb2010] [apr2010]

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