Beginners - July 2009 (Page 11)

How can i get certain parts of an array
 
Hi Guys, Now I have an array where I enter the data and then once i type "finish" the data in the array goes to another class and is stored as private data, the...
[14 replies] Last: Glad to hear it helped. (It's usually frowned upon to post entire prog... (by DCC1)
by wretch
cannot convert 'this' pointer from 'const myClass' to 'myClass &'
 
#include <iostream> using namespace std; class myClass { public: int myInt; myClass() { myInt = 111; } //cannot convert 'this' pointer f...
[4 replies] Last: Thanks Disch . Suddenly it seems obvious now that you put it that wa... (by wretch)
Unfamiliar: Stepping through array
 
First the code im using this far int process() { } int output() { } struct circle_t { int x,y,r; /* x, y, radius *...
[6 replies] Last: No, you can't, you have to use a loop, and premake your array. c... (by firedraco)
Working with data files
 
I want to work with data files. I've written programs that should work with data files in theory, but I want to experiment with actual data file and i dont kno...
[2 replies] Last: That explains everything. Thanks. (by vince510)
Reinitializing object
 
Hi, Is there a way I could call a constructor for already constructed object? I have something like this: int global_val=0; struct A: public A{ //memb...
[3 replies] Last: since global_val is a global variable, why bother using a structure in... (by kempofighter)
Compiler proper ?
 
Hi guys, I have one simple question. What is "compiler proper" ? Thank you in advance. :)
[3 replies] Last: Zhuge@ Thank you for the explanation. :) Duoas@ I'm far from a... (by cppuser)
How do I wrap an array?
 
Can someone please tell me how I would wrap my array. Lets say that it is of size 10. What I want it to do is count the number of letters in the name then mod i...
[1 reply] : If you want to check the next slot: // bad: hashIndex++; // ... (by Disch)
list implemetation in C++ STL
 
Hey Experts, I am novice to STL. can anyone pls help me in understanding how to create a list from an input file. for example say we have a input file havin...
[8 replies] Last: Not directly, but I will tend to write a little class to do it for me:... (by Duthomhas)
error when using class template
 
I have a class template that is structured like the following: "template <class T> class Vec" and I am trying to create a Vec object like the following: ...
[7 replies] Last: Thanks! Your trivial example is very helpful. I think I can create a... (by whosecalling)
random is not so random
 
This works but the random number is always the same random number every time I compile it is there something more random that I could use? int length...
[3 replies] Last: Even so, though, you should be aware that the original premise stands:... (by Duthomhas)
by mordor
vector initilization problem
 
Hi all When we declare a vector we can at the same time initilize it. such as vector<double> vec(5); this fills the vector with 5 zeros; But if we dont...
[3 replies] Last: Another way is: vector<int> vec; //puts 4 elements of value 20 ... (by felipe21)
by j0e21
Pig Dice Game
 
The program works except the win lose condition does not trigger. If the player or computer reaches a score of 100 or more then the game is over. However this d...
[4 replies] Last: from what firedraco said it looks like you have an infinite loop. 17-... (by vince510)
Trouble compiling simple program
 
Hi all, Im having a bit of trouble compiling a simple program (just a window) in visual c++ (the full version, not express). I'm guessing there must be somethin...
[2 replies] Last: I did choose win32 project. Like I said, Im able to compile the code f... (by adassus)
by yazzy
Average of any 150 numbers as input with loop ?
 
Hello guys , i have a homework (which i will not ask for solution) just asking for 1 problem hint. The homework is to get the Max , Min , Sum and Avg for an...
[10 replies] Last: Yes, exactly. You can use your counter variable to know whether or not... (by Duthomhas)
split array of charachter into two part
 
is there a function that will split array of charachter in to two parts. for example. if we have a string "mashineGun" and we search for the string "mashi...
[2 replies] Last: O.k thank you guys, i thaught that this function is maybe present in ... (by jasmin m)
ofstream error with operator<<
 
Hi, I am writing a macro for a program called ROOT (big physics library/analysis package type thing)(I'm pretty sure the error is C++ related rather than ROOT-...
[2 replies] Last: Thanks for the reply that got it working :). (by TJHague)
how to insall vc++ program in other system
 
hi, i ve developed a program its working fine in mine PC but when i cut and paste the debug in other PC its not working i dont want to install the visual ...
[4 replies] Last: For the linker setting: Project > Properties > Configuration Properti... (by Bazzy)
Completely New to C++
 
I decided I wanted to try and learn C++ to write some dll files to be used in audio programs as effect plug ins. I downloaded the API information for the aud...
[4 replies] Last: I appreciate your help - I understand the dll is utilized within an ex... (by txshonk)
by mordor
problem with arrays
 
Hi all: I have read quite some explenations on the use of arrays yet i still can not figure out why my code stop when i=101(vc2008 express) double *cp...
[1 reply] : new double(size); allocates space for exactly ONE double and init... (by jsmith)
Arrays
 
I have an issue with a new code I am writing involving arrays. I have a program where it suppose to ask for the current month and then the rainfall. after it wi...
[2 replies] Last: Ok, so I re-did everything and it shows up fine. I am a little confuse... (by chasescoot066)
July 2009 Pages: 1... 910111213... 20
  Archived months: [jun2009] [aug2009]

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