General C++ Programming - December 2013 (Page 28)

by Plavsa
Question about C string
 
Hello, i got a question about C string. Is it possible to replace one char with string without using dynamic allocation? Example is, to replace "a" with ...
[no replies]
a Program to print "Big Letters"
 
I need help writing a program where I use small letter to write names in Big letters. (I dont know if you understand what i mean). Follow link to description. ...
[6 replies] Last: From the document the OP included as a link, the definitions for lett... (by fumes007)
static variable
 
Why we need to assign memory explicitly for static variables? like int Base::m; can any one please explain?
[3 replies] Last: static int m; is basically a prototype for the variable, saying that... (by Zhuge)
How do i label the vertical axis with numbers?
 
at the moment i have the horizontal axis labeled from 0 - 7.. but how do i label the vertical axis? this is my code at the minute: void displayBoard() { ...
[no replies]
by MST
erf function
 
Hi every one I want to know is there any function available for error function(erf) in Visual C++? thanks
[2 replies] Last: The error function is a mathematical function. In any case, TC has alr... (by Zhuge)
Cant refresh the checkers board on my application
 
I Cant get my checkers game board to refresh every time i make a move. i have system("cls") But it does nothing of the sort.. To move a pice ive create...
[7 replies] Last: You're very welcome! Cheers. :) (by Tresky)
Compiling and Linking in C++
 
When you write a c++ program, the next step is to compile the program before running it. The compilation is the process which convert the program written in hum...
[2 replies] Last: this was just an article!! I provided the link!! there is one questio... (by prashant0789)
How to make this code run more faster (1,2,3)
 
#include <stdio.h> #include <string.h> #define BOOL short int #define TRUE 1 #define FALSE 0 #define MAX 1000002 #define PRE c[m-i] #define NXT c[m+i+tm] /*...
[41 replies] Last: First things first: have you understood how the algorithm works? If y... (by JLBorges)
Getting Core dump
 
I am trying to execute the following code, am getting coredump,can one please help on this #include <iostream> using namespace std; static int fun1(int...
[4 replies] Last: Thanks.... (by Ajaycpp)
how to make minimax multi player?
 
I have pseudo code for the minimax algorithm but i was wondering what i would need to add to make it work with many players (n players)? score minimax(sta...
[3 replies] Last: So let's say you have 4 players. int playerevals , i; for(i = 0; i... (by Mats)
Connect Me Game
 
I am doing a program similar to connect four but instead of lining of four pieces, the winner has to spell out my last name (dumoulin) to win. It can be won in ...
[1 reply] : Please use code tags! You just need to check each horizontal, vertic... (by Mats)
by LB
constexpr pow via template metaprogramming
 
http://ideone.com/ZYgFmr template<typename T, T b, T e> struct constexpr_pow : std::integral_constant<T, b*constexpr_pow<T, b, e-1>::value> { }; template<ty...
[8 replies] Last: > As with much of template metaprogramming, it benefits from divide-an... (by JLBorges)
c++ masters HELP please.
 
this is my code but our professor wants me to make a program wherein the size of the arrays are both numbers and letters for example 'array ' does anyone knows...
[5 replies] Last: yeah he just wanted me to do that :? sorry i'm not a major in I.T :( (by aiko cruz)
Calculating Gross Pay - Arrays
 
I have started to learn C++ and have come to this forum many times from google searches, here is my problem, I am just learning arrays, I modified my program to...
[2 replies] Last: Thanks, I am going to look at your first post and the corrections you ... (by PatrickSB)
Can anyone help
 
for(std::vector<GameObject*>::size_type i = 0; i != m_gameObjects.size(); i ++) I am getting the error message: 'm_gameObjects' : attribute not found. ...
[11 replies] Last: Thanks Disch you nailed it. Really appreciate the help. (by poeteskimo)
why are errors appearing under the '=' and the 'board'?
 
im making a checkers game and im a beginner. i am tryin to move the pieces; but im getting so many errors. Can anyone help explain why? and assist me to a so...
[1 reply] : What errors are you getting? This might come as a shock to you, but w... (by MikeyBoy)
code for displaying text file not working
 
hello coders, i have turbo c++ 3.0 installed . my program is compiled without error and is running. but when i choose option to display scores in the consol ,...
[4 replies] Last: thankyou JLBorges. you solved my problem :) (by coder mj)
Phone Directory
 
I have a lot of code right now but I did it wrong...I need to be able to put the phone number in and the name is output. I have it reversed I think but when I ...
[2 replies] Last: I think you might want to make this easier on yourself and learn how t... (by Tresky)
Generating permuataions
 
I know how to generate all permutations of a list like: {'h','e','k','p'} But I am needing to know how to generate all permutations like: {{'a','b'}, {'h',...
[3 replies] Last: Thank you guys very much. (by Script Coder)
Sum and Average
 
I'm a beginner, how would I make it so that I can have someone input the length, width and height for all 3 boxes and then have it output the sum and average vo...
[1 reply] : The simplest way would be to use simple cin commands. cout << "Enter... (by Tresky)
December 2013 Pages: 1... 2627282930... 37
  Archived months: [nov2013] [jan2014]

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