General C++ Programming - November 2013 (Page 8)

Binary search
 
I have written a binary search algorithm and it is giving me problems. It takes too long to finish running and gets killed. How do I get it to run faster or be ...
[6 replies] Last: The only change I had to make to run the code properly was line 6: w... (by Duthomhas)
Can you guys tell me whats wrong with this code, its for a tic tac toe game.
 
#include <iostream> using namespace std; char square = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; int checkwin(); void board(); int main(...
[5 replies] Last: Thanks for the support guys. The game now works like it is supposed to... (by Stealth987)
finding error
 
please help me out ... Teacher will give him tomorrow :"( : ) a) template < class A > int sum( int num1, int num2, int ...
[2 replies] Last: thank u very much bro .. (by doaa ebraheem)
by oktave
Stuck don't know where to start
 
Write a class definition for a Fraction class. Its member fields are num and den, both of type int. The constructor builds the default fraction 1/1. It has the ...
[2 replies] Last: You've pretty much been told exactly what the class should contain. W... (by dhayden)
Help for a course work
 
Hi!I have a slight problem with this program and I will be glad if anyone can help me: Create a program,which contains these functions: Two stacks with int da...
[2 replies] Last: Thank you!I now realise my mistakes and I`ll write the full code tomor... (by ferarista)
HELP with Tick Member Function !!
 
I wanna write a program that tests the tick member function in a loop that prints the time during each iteration of the loop to illustrate that the tick member ...
[3 replies] Last: If you really need it to remember the value from one run to the next t... (by dhayden)
declaring class for implementation HELP!
 
#include <iostream> using namespace std; class Transaction { private: int TransactionId, CustomerID,Cost; public: Transaction(in...
[1 reply] : I see your code. What is your question? I see several problems with ... (by dhayden)
Can some explain this please.
 
Hi could some please explain what kind of variable this is : unsigned int endIp=( ipEnd <<24 | ipEnd <<16 | ip...
[5 replies] Last: For what it's worth, it looks like this code unsigned int endIp=( ip... (by dhayden)
Heap limits?
 
I'm wondering if I'm reaching the limits of how many times I can use the "new" keyword or heap size. Upon initialization, I am creating a ton of objects. I...
[4 replies] Last: Certainly heap corruption. I am only using 15MB of memory. Now the t... (by Stewbond)
by amc246
Sorting numerical array error
 
Can anyone explain why this wont run? I'm getting the cant convert int* to const char error but i do not know why? I'm trying to create a program that create...
[3 replies] Last: strlen() returrns the number of characters in a null-terminated array ... (by dhayden)
need help with revised lexing algorithim
 
so i rewrote my lexical analyzer so that its based off stroustrops calculator rather than using regex's. the only problem is trying to handle multi character op...
[no replies]
by bbrshr
I need help to promote user to enter y/n in switch statement to continue or not
 
I need help to promote user to enter y/n in switch statement to continue or not for an other conversion after showing results of each conversion. ...
[1 reply] : Try to include your code: lines 9 - 54 in a while loop( bolds ) ... (by condor)
Is this a good implementation ? ( factory pattern + forwarding )
 
I'm trying to get into meta-programming techniques, with the new C++11 we now get the ability to "forward" ( which is basically a cast for what I know ) the con...
[3 replies] Last: > template <class T> T buildT(T t) T is passed by value; the issue ... (by JLBorges)
Bitwise Shift Operations?
 
There's allot of information on Bitwise operations on the internet but I think some aspects are really poorly explained. I'm trying to work out why you wou...
[9 replies] Last: You could loop through bits if you want (by Lowest0ne)
by maniac
Project book
 
Hello! I have been studying C++ for more that one year and a half and I know how to work with data structures and things like that including Classes. Can you re...
[9 replies] Last: You probably won't download an xml file from the site unless it has an... (by ajh32)
Method to loop through network ips
 
Hi i really need help with problem. This problem relates to a program i am developing to ping all hosts on a network. So far I've managed to access a Postgre...
[1 reply] : #include <iostream> #include <cstdint> #include <strstream> #include ... (by JLBorges)
by mabbia
void gotoxy
 
i want to create a pacman game..ma pacman should be of circle by using void myEllipse(int x1, int y1, int x2, int y2,int color); i want to use void gotxy fun...
[no replies]
Beginner Coder here :( and being the only girl in my class doesn't help because the teacher never helps me
 
Can someone help me find the solutions to the questions below? 1. Declare and initialize two ints yourPlace and myPlace. Make a pointer to each. Clearly prin...
[6 replies] Last: But it's so hard :( @Codegirl123 - you just need to sit down and st... (by ajh32)
by Mats
Communicating with another program
 
I downloaded GoGui (http://gogui.sourceforge.net/) and would like to make an AI in C++ to play Go and for it to send its moves to GoGui. I read the documentatio...
[3 replies] Last: Thanks, this was helpful. : ) (by Mats)
superfluous code
 
In the below piece of code, there is a condition "if(wordlen > 0)". But it seems that the condition is not even needed, because if the previous character was a ...
[1 reply] : So is "if(wordlen > 0)" superfluous in the below definition? No, it's... (by coder777)
November 2013 Pages: 1... 678910... 46
  Archived months: [oct2013] [dec2013]

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