Beginners - November 2010 (Page 37)

by dvnmok
Having problems with Connect4 type program
 
Hi I'm trying to make a program that prompts the user for the dimensions of the game board and also the number of pieces in a row that is required to win (ie: c...
[3 replies] Last: Is there a pattern to the misplacement of the game piece? (by jamesmk)
Creating an event creator
 
Basically it would take the name, address of the venue then take the row name and total number of seats in each individual row. furthermore it needs to take sec...
[no replies]
+= or + is faster for primitive type?
 
Acoording to the rule of operator overloading "+" is always more expensive than "+=" But what if those type like "int", "double" or "char"? Are they also fas...
[3 replies] Last: Thanks to both of you, you guys really help me a lot "think like a co... (by stereoMatching)
Convert System::String to Char Array
 
I have looked at many fourms and found many theories on the conversion from marshal strings to pointer but no actual working code example. What I need to do is ...
[1 reply] : http://www.google.com/search?q=system::string+to+cstring&search= All ... (by Duthomhas)
Passing an array through function
 
To broaden my experience I am working on a silly little project to hone up on my skills. I am trying to write a program to play poker with itself. Being rusty ...
[1 reply] : http://www.cplusplus.com/reference/algorithm/copy/ Hope this helps. (by Duthomhas)
Queues and copying
 
Hi. I'm having trouble with, uh, queues and copying. Here's some code: template <class Type> const queueType<Type>& queueType<Type>::operator=(const qu...
[4 replies] Last: I tried out all those suggestions, to no avail. The constructor one s... (by Erdrigard)
Need someoe to finish my fine root program
 
HELLO EVERYONE! IM A NOVICE C++ USER AS I HAVE BEEN STUDYING THE SUBJECT FOR ABOUT 4 MONTHS NOW... I NEED HELP ON A PROGRAM IM WORKING ON THE INSTRUCTIONS FOLLO...
[1 reply] : Okay. I was happy to give you that template there, but we don't give o... (by Albatross)
by Faff
Trouble with the for loop
 
Hello :) currentely learning c++ (on vc++ 2010 express ed.) but having a little problem with the for loop. My Code: #include <iostream> using namespac...
[4 replies] Last: sry , just read in another topic that it's appearentely making trouble... (by Faff)
Simple program
 
Hey guys just trying to write a simple program where I ask the user to in 2 numbers. So if the user puts the 6 first and then let say 2 i print back the resul...
[2 replies] Last: This is a simple problem, so you should look for a simple solution. ... (by HooklessFastener)
Why printing to file like this?
 
Finally got this program to do something besides spin my data drive around in infinite debugging mode. Problem is the output is hit and miss. It probably a v...
[no replies]
program is not working
 
Hi, I am very new to C++ and I my program is not working and I can't see why. Here is my code, basically I am trying to find out if I invest a certain amount o...
[3 replies] Last: Thank you so much!! (by smquarterman)
Stack vs Heap Memory
 
An exercise is to write a program that shows how memory is allocated to stack variables compared to heap variables. I ran the following code. #include "../...
[5 replies] Last: It is important in more advanced programming situations, like programm... (by Raggers)
by airowe
Exception Handling
 
I'm getting a LNK2001 error that I'm not sure how to resolve. I was hoping I could get a point in the right direction. Here's my code: // numberverifier.c...
[no replies]
by heidiK
parsing a string and stroing in struct
 
Hello everyone Could any one please help me parsing a line having different fields separated through commas. I want to store each comma separated sub string in...
[1 reply] : The getline () function you get from #including <string> does what yo... (by Duthomhas)
Counting words
 
I have to count characters, spaces, and words. how can i do this, my codes keeps adding words. thank you int main() { ifstream in_file; char ch, old; ...
[1 reply] : Shouldn't your second if(...) statement test to ch to see if it isn't ... (by Computergeek01)
Does not name a type error using G++
 
The code that follows is from a textbook. I am using g++ 4.5.0 via MinGW environment on Windows 7 Professional x64. This code should work as it's from a textboo...
[2 replies] Last: Wow. Just, wow. Thank you very much jsmith. I never tried "std::" beca... (by tacojoethethird)
by Parse
Infinite Loop?
 
I am trying to make a function that trims a body of text to a max of 80 characters (for console printing) per line. If the line is > 80 characters it should ch...
[7 replies] Last: Then use std::string::find() to find the first \n. If it is more than... (by jsmith)
Inputting Data into a 2-D Array
 
This array is designed to store grade data on 8 projects for n students. Okay, so I have the array declared as int Students; int Projects=8; int Grades ...
[7 replies] Last: Nevermind, I figured out the problem. In the stacked 'for' loops, the... (by irspeshul)
default values for class members
 
Is it possible to set a class member to a default value? I know the answer is "yes", in general, but I seem to be having trouble doing it. Here is a truncat...
[2 replies] Last: Much thanks! I was trying to do that earlier but must have had incorr... (by ricomoss)
Where's the logic flaw?
 
Hey guys! First of all, this is an awesome website. Very well designed and informative! I'm new to C++ and I've been asked to create a program that gets u...
[2 replies] Last: That is very sound advice and I agree 100%. I will definitely consider... (by RpTheHotrod)
November 2010 Pages: 1... 3536373839... 42
  Archived months: [oct2010] [dec2010]

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