General C++ Programming - April 2012 (Page 40)

C++ Tic Tac Toe help
 
how would you make tic tac toe game using classes and algorithms I wrote a code but theres only one class which has got if and else statemnets. But I want to m...
[7 replies] Last: idhjs (by hgill93)
Expression must be a modified l-value
 
I am having some proplems with my code - I am told to create a mouse and apple game and I am having some trouble with using the array in different funtion...
[no replies]
crash in strcmp(f(), g()) if g() returns NULL.
 
I see that strcmp does not crash when NULL is passed as an argument. But the same stuff , if the same NULL argument is being passed from the return value of a ...
[4 replies] Last: I think it's undefined and it doesn't matter if the pointer comes from... (by Peter87)
recoding a irc bot from mirc to c++
 
Heyas and good eve totally new to this coding scene have had some small experience in ruby and php but c++ seems a task id like to try at the moment i am resh...
[no replies]
by Bouya
Virtual fonction
 
Hi I want to herit from a class that declare virtual fonctions in the header file. So should i mention them in the header file in the new class or there is no...
[2 replies] Last: I like to declare every virtual function virtual. That includes the ba... (by iDontGetIt)
GA and EA algoritm examples
 
I need some examples for Genetic and Evolutionary algorithms in C++. For solving different problems, not only the Traveling Salesman Problem. I couldn't find ...
[4 replies] Last: I don't need a library. I need an example for something like tetris, c... (by Mtutnid)
by Grbe
Statistical function - upper incomplete gamma function
 
I need upper incomplete gamma function for C++.. I have here lower incomplete gamma function.. But i need upper incomplete gamma function. double incgamma (...
[3 replies] Last: Is there somewhere a function itself, without the whole package .. as ... (by Grbe)
how to control if two vectors have the same values
 
Hi everybody's here, i need to write a function to control if two vectors have the same values and the same count for each value. Any hint for me? Thanks f...
[5 replies] Last: If you don't care about the order you can sort the two vectors before ... (by Peter87)
by Janman
Reading from file to bitset
 
Hi, I have an enciphering function: encipher(long data , long key ) This function is called when I want to change data (2*32bits) from the file to enciphere...
[1 reply] : This demontrates the syntax. #include <fstream> int main() { lon... (by kbw)
by applee
Inheritance
 
Hi! I'm having trouble with multiple inheritance. I'm supposed to write a program for chatrooms, the situation being this: -A chatroom contains a name, a li...
[no replies]
Could someone please correct this code for me?
 
Hello all! Okay, so I was going to write a map-builder for my text-based game. The file structure goes as follows: 1) Number of rows for map. 2) Number o...
[6 replies] Last: Never knew that (but, thinking about it, it does make sense binary cou... (by Exispistis)
File or Folder?
 
Hello forum! I'm looking to determine if a filename is either a folder or a file. I can list the files using dirent header but because it will not allow me to...
[1 reply] : Unix: // http://www.freebsd.org/cgi/man.cgi?query=stat&apropos=0&sekti... (by JLBorges)
visual basics?
 
Ok lets get straight to the point my question is do i want to leanr visual basic is it worth anything can i usefully use it? leave a comment thanks hunter!
[7 replies] Last: ok thanks... i started to learn VB im half way in? but im stoping and ... (by hulibarri)
Moving an image using a IR sensor(MFC)?
 
Hey guys,I have an IR sensor here and I was wondering would it be posssible to create some sort of mfc program to move an image on the screen with the sensor? ...
[no replies]
Binary tree traversal
 
So I'm reading up on binary trees (I wanted to challenge myself and learn a new topic in c++) and as a side exercise there's a question that's been stumping me....
[no replies]
by zkype
How can I initialize array in Class's constructor
 
Hi , As far as I know if we want to pass array to function there are two ways. One is we need to pass array name and size as an argument and the other one is...
[1 reply] : In this case, the assumption is that you are always passing a fixed si... (by PanGalactic)
by shaggy
Vector of Bullets - support needed
 
Hello and thank you for reading this and helping me. I am using SDL and openGL. I want to get my guy to shoot a bullet every time i press "space", or hold do...
[4 replies] Last: thankyou very much for all the replies. I do not no much about vectors... (by shaggy)
Merge sort header resulting in random values
 
Ok so, I created a simple merge sort header as you can see below. I am however having some issues with it, the end result in the array is a random assortment o...
[2 replies] Last: this is obviously a test i was using for the merge sort header Ran... (by GFreak45)
No assistance from compiler
 
It will not compile. The compiler is not highlighting errors. Is this normal? It is giving me messages of line 771 and 559 and so on. The code can't be more...
[5 replies] Last: I believe it's called IntelliSense. Anyways, he didn't actually say he... (by hanst99)
by kready
Replacing words in a string from a text file.
 
Hi. I am new to programming and im having a problem with this code. I have to write a program that reads in a paragraph from a text file, then replace certain w...
[1 reply] : You open the file, create an array of chars. Read in every file's ch... (by Ortonas)
April 2012 Pages: 1... 3839404142... 49
  Archived months: [mar2012] [may2012]

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