Beginners - April 2013 (Page 17)

Need help with my Structs
 
My program allows a user to enter in player names and their stats and I need to use structs. I also put an array inside of my struct for the names and the stat...
[5 replies] Last: Thank you kooth I finally got to the point were I can compile after co... (by ejhernandez381)
Linker error?
 
It keeps giving me a Linker error in the DaysOut function and also the findAverage function. I have no idea what is wrong and I've been trying to throw in all ...
[2 replies] Last: Thanks...I guess I overlooked that. Seems so simple. Thanks a lot! (by MrBrewski99)
CodeBlocks IDE
 
I feel CodeBlocks is one of the best IDE's out there for beginners. Tho what annoys me is, that I don't seem to be able to change the background color to lets ...
[4 replies] Last: Did you accidentally change every color to the same color? (by lmsmi1)
Command line argument (filename)
 
Some of the arguments my program takes are file locations. As file names can contain a space the argv could be parsed half way through a path which is unwanted....
[2 replies] Last: Enclose each file name in double quotes. (by vlad from moscow)
Help with initializing a 2 dimensional array
 
I was wondering if there is a better way to factor the following array initialization. And please no 12 days of Christmas type optimization : ) Thank you....
[1 reply] : As I have understood the result array should look as 1 2 3 4 5 6 7 8 ... (by vlad from moscow)
by zantax
Grids+Movement
 
Me and a few other kids are in a coding class and have been given the project to create a game. We thought a simple tron game would be easy enough. Sadly we wer...
[no replies]
by hmdsp5
Creating a file in c++ (1,2)
 
Hello guys, i have a problem at storing some infos of different type in a file.I created a struct so that i can deal with the dif types of the variables, but th...
[29 replies] Last: could you please delete it? (by hmdsp5)
Explaination Help (one more)
 
What is happening in this code? why is the if(a==0 || b==0) in here and what is it doing? what is happening in the for loop? #include <stdio.h> #incl...
[4 replies] Last: Thank you everyone for the help! Trying to get better at this ha (by bruntmjust)
Leap year Fix.
 
Hello all, I am very new to C++ here is a calender code that prints each date of the month that the user types example: cout " Please enter month and year"...
[2 replies] Last: Thank you sir, I fixed it :). (by Melicalol)
by Slyke
Data not being stored in void * struct.
 
I have the following struct: struct memoryPointer { int memoryIndex; void * memoryLoc; int memorySize; }; When this returns 0: memoryAlloc .memo...
[6 replies] Last: It looks loke that in the loop for (int i = 1;i<size;i++) { ... (by vlad from moscow)
by Nebur
how to add up some numbers?
 
Is it possible to add up an uknown amount of double numbers from a string in a single value? Ex: I: 1,2 3,5 7 8 O: 19,7 Thanks everyone!
[4 replies] Last: A istringstream allows input to be read in from a string, in the sam... (by Chervil)
Tic Tac Toe
 
I quickly made a tic tac toe program that works fine (some error handling isn't present but I'll put that in later) and exactly how I want it too. While I was c...
[no replies]
if statements and strings
 
I'm fairly new to the C++ language, and I've been having difficulty with user-input in relation to if statements. #include <iostream> #include <string> ...
[7 replies] Last: No problem buddy :) Best of luck! (by jefw123)
Block type is Vaild
 
Hello every one I am having a problem with this code I am new to C++ but have some experience with C# and Java.Every time this code runs it runs fine until i pr...
[3 replies] Last: "pogrady" thank you very much that solved my problem. (by otisphat80)
Constructors
 
Hey guys, how do i make a constructor/ destructor to a class inside a class? for example: h.file class MonomList{ private: class Node{ ...
[5 replies] Last: > Having a Monom* as a data member in the Node suggests polymorphic st... (by ne555)
by neilq5
simple while loop not closing
 
I created a simple IF statement inside a while loop that can call 2 different methods depending on the key pressed. #include <iostream> #include <stri...
[3 replies] Last: A stupidly overlooked that. Thanks abhishekm71! (by neilq5)
by lmsmi1
How to handle external if statement?
 
Let's say I have this in a file: if 1 < 5 { print hello. } I'm assuming I'd compare the intergers in the string. However I can't seem to store the...
[2 replies] Last: Just to add onto what RB said, here is a quick example of using string... (by closed account 3qX21hU5)
a problem with vectors and cin
 
I've run into a problem using vectors and pushing numbers onto the vector. Here is some sample code int main(){ vector<double> list; dou...
[3 replies] Last: Thanks Peter87. Your cin.clear() command worked for me. (by strangelove1221)
c++ problem
 
I have been given a problem by my teacher which I can not solve. I have a sequence of numbers given and some operations: change the value at a given position or...
[7 replies] Last: In that case term interval should be changed into term range. Simpler... (by keskiverto)
Initialize class with pointer
 
I don't understand how classes construct when they are instantiated by a pointer. class cpolygon{ int base; int height; int perimeter; int area; public: ...
[1 reply] : You have to construct it somehow. You can create an object just like ... (by Peter87)
April 2013 Pages: 1... 1516171819... 83
  Archived months: [mar2013] [may2013]

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