Beginners - July 2015

by moufou
problem with string replace (char *)
 
It's been a long time I didn't program with C++ (i have been working with java which i am not a fan), so i decide to practice. I'm trying to make a hangman b...
[2 replies] Last: wow thanks a lot, this will simplify a lot the code. thanks again. (by moufou)
Error C2039 despite having header files
 
***UPDATE*** So i googled my error and determined error C2039 was a missing header file (that all i could find online) I have the required header files but it i...
[8 replies] Last: That sounds simple enough. Thank You! I still wasnt able to see my pro... (by kingkush)
by Filorn
little encoder doesn't work
 
When i open this program windows says that it stopped working. Why??? #include<stdio.h> #include<string.h> char *c; //Funzione per codificare una strin...
[1 reply] : oh sorry i have just correct one thing so THIS one is the real encoder... (by Filorn)
by Filorn
atoi
 
I have a question about the atoi function... Why doesn't it convert a char into its ascii number? #include<stdio.h> #include<stdlib.h> char c; int n; ...
[2 replies] Last: oh thanks now i got it (by Filorn)
void main()
 
I see a lot of discussions about void main() If void main() is so bad, then why does it exist in the first place? Sorry for bad English
[3 replies] Last: @ OP: void main() is wrong because the C++ ISO standard explicitly sta... (by Computergeek01)
by leourb
Visual Studio Compile-time Error with Header and Source File
 
Hi! I have a problem with VS2015. When I write a header and then I write its source file and put them in the project, when I try to compile it gives me a lot...
[3 replies] Last: I have solved putting "Header.h" after "stdafx.h" and "std_lib_facilit... (by leourb)
by JoanT
Game board code
 
This question is pretty complicated. Write a program to simulate a simplified board game called Survival. Two clans are stranded on opposite ends of an island i...
[3 replies] Last: Hi, I think it is awesome that you have written some pseudo code to h... (by TheIdeasMan)
Linking and Includes
 
Hi ! I have read some guides to understand what should I put in source files(cpp/c) and what in header files(h) (like http://www.cplusplus.com/forum/articles...
[1 reply] : on your header file i would remove serverConfig. just have a struct a... (by rafae11)
To store a single char value
 
I'm having an issue with my code if someone enters y it works fine but I want to stop multiple entries ie: if someone puts yes or a series of yyyy it should run...
[8 replies] Last: I don't think it's laughable though, I honestly think that ctrl-c is h... (by Computergeek01)
by stav
vectors faster than lists?
 
Hi, sooo when I learned about lists I was told that in order to search for a value we'd have to go through every single node whereas in an array we could just...
[3 replies] Last: > but...recently learned about vectors which are as fast as arrays? > ... (by JLBorges)
iterator of std::array within a vector dereferencing
 
std::vector<std::array<sf::RectangleShape,number_of_blocks_per_shape>>::const_iterator iter; for ( iter = forms.begin(); iter != forms.end(); iter++ ...
[2 replies] Last: okay thanks @keskiverto passing 'const value_type {aka const sf::Rec... (by xenoviaquarta)
How can i read a text file from a specified location?
 
I have the text file written in X:\CPlusPlus.txt I have program in the C:\Program.exe How can i read a text file from a specified location?
[2 replies] Last: It doesn't work... I don't know where's the file. char LOCATION; ... (by closed account 16pXSL3A)
To print boolean
 
Hi guys!, A basic question: What's the syntax to print a boolean array?? if I have an array something like this, bool *boolArray = new bool Ho...
[1 reply] : // Example program #include <iostream> #include <string> bool myBool... (by rafae11)
Issue with crash at exit
 
Hey guys, Not sure what is happening here, but all of a sudden I started having crash issues when I close my program. The thing is, it started happening afte...
[1 reply] : http://www.cplusplus.com/forum/general/170598/ Stay with 1 thread. (by Hippogriff)
"THIS" Pointers and function calls
 
I'm doing some pointer exercises from GeeksforGeeks, and I'm having trouble understanding what (*this) does, in the following code. What exactly is (*this) i...
[4 replies] Last: it seems pointers and addresses within classes is another beast alto... (by keskiverto)
by Filorn
tutorial searching
 
I need a very full-detailed (i think it is right grammatically) c and c++ programming guide. Could you suggest me one (not this one on cplusplus.com)? I prefer ...
[6 replies] Last: Online: http://cppannotations.sourceforge.net/annotations/html/ Downlo... (by JLBorges)
Array Can't Shuffle!
 
Can you help with the the shuffle part of my script! I can't get it down! //finds full deck.// War Card Game! (Build 15w30) // This is is a player vs. c...
[4 replies] Last: A pointer to an element in an array is a random access iterator. Lega... (by JLBorges)
method to check if char array is a number ?
 
suppose char array being "-123.456" then the method confirms it is a number, and if the array is "45fg" then the method confirms it is not a number, is there a ...
[2 replies] Last: #include <iostream> #include <string> bool is_double( const std::str... (by JLBorges)
by siery
Dynamic memory allocation problem
 
Hello. I was reading in the last time about dynamic memory allocation in c++. For tests i write this small piece of code bellow. As you see i simply allocate o...
[7 replies] Last: I'd personally try to avoid using C-style strings if possible, instead... (by closed account E0p9LyTq)
Derived class objects in singly linked list stack
 
I have a base class, lets call it fighter. I have derived classes of different sort of fighters - Axeman, Jester, etc. I have made a singly linked list stack. M...
[3 replies] Last: Where are you trying to push a Jester? And what do you mean by "doesn'... (by booradley60)
July 2015 Pages: 123... 33
  Archived months: [jun2015] [aug2015]

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