Beginners - December 2013 (Page 7)

Unresolved Externals Error
 
Hello, I have written a simple console card game, it is supposed to give the player five random cards ranging from 1 to 13 via "rand()%13+1" instruction then ca...
[5 replies] Last: @ne555:It doesn't say which symbol, it doesn't underline it, it doesn'... (by LizardEye)
by asmita
Boost REGEX regex_match grep option
 
Hi, Environment: Windows 7 (32 bit), Visual Studio 2010 (Visual C++) I am trying to use Boost REGEX regex_match algorithm. I am using its grep flag. My ...
[5 replies] Last: http://coliru.stacked-crooked.com/a/e417396b14695b59 (by JLBorges)
delete the allocated memory
 
have to delete the allocated memory unsigned int* buffer; buffer = new() unsigned int ;
[1 reply] : Can't give you the answer directly. How about this: http://www.cplusp... (by closed account j3Rz8vqX)
sequence number algorithm
 
Hello everyone. My goal in this program is to create a network packet that send request by using sequence number. I wanted to combine two sequence number in one...
[no replies]
Counting Grade program using switch, but chooses default without entering any grade?
 
Im using Visual studios here, heres my code: GradeBook.h: #include<string> using namespace std; class GradeBook { public: GradeBook(string); v...
[6 replies] Last: You'd probably want to use cin.ignore() rather than cin.get() . Thi... (by TwilightSpectre)
C++ Graphics problem
 
Is there any tutorial on how to use graphics.h in C++? Or can I use any other graphics in C++? If there is any tutorial then give me the link. thanks in adva...
[1 reply] : Try sdl or sfml. What platform are you on? What OS? IDE? Tutorials... (by closed account j3Rz8vqX)
Why are Header Guards names in capital and with underscore?
 
I noticed that .h files have their name capitalized and uses underscore for header guards....why is that? for example take "doThat.h" the header guard would b...
[1 reply] : All caps traditionally is used for macros (defines) so that there's le... (by Disch)
by Garion
What am I doing wrong?
 
I set up an if statement like this and buffer_start_pos is equal to int 1 when I pass it to Title.Set_Zone_Name. if (buffer_start_pos = buffer.find("You ...
[3 replies] Last: ahh thanks. That seems to make it work :) (by Garion)
Creating a password prompt
 
Hi, i'm creating a password prompt and i'm having errors. I want to create something that only allows 3 password attempts. This is what i've come to so far.. ...
[6 replies] Last: Space is considered a delimiter. So when you give a password that con... (by Catfish666)
not writing to file.
 
Hello, this is my first post so go easy if I break a rule or several. I'm new to coding and I'm trying to teach myself through the tutorials and reading others...
[8 replies] Last: No problem, it was all you. Happy New Years. (by closed account j3Rz8vqX)
Array question
 
I was writing a program that takes in 5 numbers, and calculates the lowest number and outputs it. The code I wrote didn't work at first (the example below does,...
[3 replies] Last: Oh I understand, if it doesn't have anything to compare it to then I w... (by Mahasti)
[Solve] Linker problem or syntax problem?
 
Hello, I'm trying to write my first class on C++. So I have the following 3 files: leftist_heap.h: #ifndef LEFTIST_HEAP_H_ #define LEFTIST_HEAP_H_ ...
[4 replies] Last: Thanks, both of you. (by videxter6)
String character removal
 
Hi, I know how to remove certain characters from a string by using something like this string str ("Hello world!"); erase (0, 6); That's gre...
[3 replies] Last: Thank you, I feel stupid now (by joewbarber)
by Garion
How to pick a container.
 
I'm not exactly sure what a best practice is for picking a container but I figured I'd ask for some general advice here! Lets say I wanted to read lines of i...
[2 replies] Last: Thanks for the suggestion, i think a stack or a queue was the idea I w... (by Garion)
about separating digits
 
Hey guys , first of all I wanted to ask is it ok , if sometimes when you don't know how to solve a problem " you tried but you couldn't solve it " , you look ...
[1 reply] : its perfectly fine to google it. the point of programming is to challe... (by closed account Dy7SLyTq)
about recursion function
 
so I've been reviewing function and I wondered if you guys could help me with something , my question is , when will the computer know where to stop ? in this c...
[2 replies] Last: Thank you so much , I'll review what you said and try to understand it... (by Cutefriendzoned)
by Kirito
Input/output file with arrays
 
Hi, I'm not understanding where I went wrong here. It compiles fine, but then my file doesn't have the array numbers and gives a stack overflow warning. Can any...
[1 reply] : > and gives a stack overflow warning ¿? stack overflow is a fatal ... (by ne555)
by Hergie
Zork Clone
 
Hello folks! I got a problem with my code. How would i generate 2 'random' integers? do{ srand(time(NULL)); int Attack = rand() % 10 + 1; int He...
[8 replies] Last: How stupid of me! Thanks! (by Hergie)
Splitting a String
 
I'm trying to do something simple. I have a phone number, and I'd like to parse it into different parts of it. string phone_number = 523-9872*8536; ...
[2 replies] Last: Yup what Matthead said //start_parse_function(&index,&theStr) ... (by closed account j3Rz8vqX)
[SDL] I'm making a snake game and apparently I have a memory leak.
 
The snake is made up of blocks. The snake class has a static vector of pointers to the snake class and each snake class (I only use one snake object called play...
[12 replies] Last: The code below is what you originally had: CBlock Head(400, 200... (by closed account j3Rz8vqX)
December 2013 Pages: 1... 56789... 69
  Archived months: [nov2013] [jan2014]

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