Beginners - December 2009 (Page 7)

Error in the source code
 
Hiya everyone,I have a problem with my source code and I just dont know how to fix it ... any suggestions ? Thanks #include <iostream> using namespa...
[4 replies] Last: That is what it means. (by guestgulkan)
by Repxl
begginer question ! (calculator)
 
Hello all im working on my first console program ( calculator ) #include <iostream> using namespace std; int main() { int iOne; int iTow; ...
[13 replies] Last: Why don't you just let it go to the thing that says "Press any key to ... (by closed account y8h7M4Gy)
by wasabi
bad_alloc too soon
 
I have written a program that has to deal with a few thousand elements (mostly unsigned int , but new keeps throwing a bad_alloc exception. The code for ...
[8 replies] Last: Also, it's worth mentioning the program does quite a bit more than sim... (by wasabi)
[Linker error] undefined reference to `WinMain@16'
 
I am writing a phonebook programe,the programe is below, and an error [Linker error] undefined reference to `WinMain@16' is appear. #include<stdio.h> #includ...
[9 replies] Last: sorry for my inconvenient :( (by prince1126)
txt files
 
how do i use txt files? can i creat text file and write in it like in word? i am thinking of making a timeline and if the user press on some option or wri...
[1 reply] : http://www.cplusplus.com/doc/tutorial/files/ (by Bazzy)
To Include Or Not To Include?
 
Hi all, My first post here, and I'm sure my question has been asked before, but couldn't quite find it. In my code for some small app, I can use string, ...
[7 replies] Last: @ Bazzy: I understand that, but found it hard to imagine they would d... (by DroolingDonut)
Passing a class's member variable or function as an argument to a function
 
Hi, I need a little help, how can I, if possible, pass a class's member function to a regular function? I'm trying to make a function that accepts class's...
[2 replies] Last: Perfect! That's exactly what I was looking for, thanks a lot. And... (by nickg140143)
Naming variables nested structures
 
struct child { int age; } alice = {1}; struct husband { int age; child child; } bob = {10, alice}; struct wife { float age; child child; } carol ...
[3 replies] Last: I'd go with a container of children objects... (by jsmith)
Like to know about time
 
I wish to know how to create a program which can track real time or run as normal time, it is possible? If can do so, please tell me how many way can i creat...
[1 reply] : Most game dev libs have a 'Get Tick' or somesuch function which return... (by Disch)
Is it possible for an instance of a class to destroy itself?
 
Hello, I'm working on a final project for my C++ Objects class, I'm basically making a very simplistic text-based battle arena game, where the player is set ...
[4 replies] Last: I see, thanks guys (by nickg140143)
*= question
 
25 *= 2 what does the *= mean? I can't find the answer anywhere!! thanks...
[3 replies] Last: In short, its a simpler way of typing: int var = 25; var = var * 2;... (by Warnis)
Function from different .cpp
 
I am trying to use a function defined in one .cpp file in another. If I'm reading this right: 1. you define the function prototype in a header file, 2. #inclu...
[3 replies] Last: *facepalm* The amount of silly mistakes I'm making. In main.cpp ... (by closed account jLNv0pDG)
dynamic array problem
 
Can someone please tell me why I can't use strncpy on a dynamic array or how I might go about getting the same task accomplished. I'm getting protected memory e...
[4 replies] Last: thanks wasabi, that's the information I needed. Thanks helios for lett... (by hansfordmc)
by Wander
Block Input
 
When I want to block input from the user I usually use: BlockInput(true); It blocks input from the mouse AND the keyboard. Is there a way to block input...
[7 replies] Last: Text with many colors and effects ( blink etc ) Draw windows and boxe... (by Bazzy)
String variables with if statements.
 
Whenever i try to use a string variable with an if statement it turns up as error. Does anybody know why? Here is the part of my code where the error is: ...
[3 replies] Last: Okay nevermind I got it. string myint; string mystr3; getline... (by closed account y8h7M4Gy)
want a container which index the elements and whose element is writable
 
I want a container which can be indexed by a member field and whose other member fields can be modified. I have tried set and found that the element retrieved f...
[1 reply] : It's not read-only, you're probably modifying a copy of the content. ... (by kbw)
Polynomial
 
# include <iostream> using namespace std; class Polynomial { private : int *array ; int x ; public : ...
[4 replies] Last: Tht first thing I see when I look here is that you havn't declaired p3... (by vbraziel)
Polynomial Function operator
 
# include <iostream> using namespace std; class Polynomial { private : int *array ; int x ; public : ...
[3 replies] Last: i have add some functions in this program they are no the same plz che... (by rishamessi)
Problem counting number of words with less than 3 characters
 
I'm new to using this website/forum, so I'll say sorry ahead of time in case my post isn't quite the format it should be. I'm trying to write a program that ...
[7 replies] Last: last example that might help: // string::push_back #include <io... (by gcampton)
by patman
which is the difference?
 
Hello. Which is the difference between "delete" and "delete ".For example if i declare int **p=new int * ; and then i use "delete p" or "delete p " .The comp...
[2 replies] Last: Oh i see,thank you my friend! (by patman)
December 2009 Pages: 1... 56789... 23
  Archived months: [nov2009] [jan2010]

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