General C++ Programming - December 2010 (Page 13)

by aatwo
Extending the maximum array size
 
Hello. I am curious about the maximum array dimension (65535) and I was wondering whether or not there was a way to extend this. One time I had an array o...
[2 replies] Last: Thanks for the reply. This is very strange because I remember getti... (by aatwo)
by Saber
Reading from text file to int vector
 
i am working on generating vector from file of integers. the broblem that i need to read one by one integer. the integers are random constructed between 0 to 50...
[1 reply] : Change getline(inFile, line) to inFile >> x; Then cout << x << endl; ... (by wolfgang)
Experimenting with Classes
 
I wrote this simple program to see how objects are instantiated and destroyed: #include <iostream> using namespace std; class A { public: ...
[2 replies] Last: Thanks. It makes sense now. (by dalbir4444)
Segmentation Fault error
 
I was practicing with classes in C++, and I wrote this simple program: #include <iostream> using namespace std; struct timer{int hour;}; class Time{ ...
[2 replies] Last: Thanks, I completely overlooked that. I was just experimenting to get ... (by dalbir4444)
error LNK2001: unresolved external error
 
I got this error. could any guru help me ? I just define a list of strings for the header of a list view. 1. in h file static const std::string m_columnH...
[4 replies] Last: That makes more sense then. I had assumed it was a global variable. (by Zhuge)
Access class members
 
In the code below, I want to access nth item of a list of class cPropertyValues, and return member variable that is represented by propertyName. I can do this b...
[2 replies] Last: Thanks, got that working. (by n4nature)
Debugging question
 
Im sort of stuck on this part of my code. Any help would be appreciated. float* ThreeValueMovingAverage(float* numbers, int count) { average = ne...
[2 replies] Last: float* ThreeValueMovingAverage(float* numbers, int count) { ... (by stravant)
Reading data errors
 
Hi guys, I have used this site for over a year now, it has helped me so much! but i cant seem to find any information on this topic: I am reading data fro...
[5 replies] Last: getfirstcolumn(); if (getcharacter() != '\t') //problem??? get... (by closed account ohRGz8AR)
by primes
what is wrong with the if...?
 
#include <iostream> using namespace std; int main() { int year; cout<<"enter a year:"; cin>>year; if(year%4==0) %% (year&100!=0) || (year %400==0) ...
[5 replies] Last: Are you even paying attention to what you're writing? You mistyped &&... (by Athar)
what is wrong in my program
 
I have a homework which sais: ”Read integers from the keyboard until you enter the same number twice in succession. Read the numbers, to display the form ...
[3 replies] Last: i solve it by myself, but thx anyway. now, it looks like this: //P... (by jumper007)
by primes
SOMETHING MORE MISSING IN THIS PROGRAM
 
#include <iostream> using namespace std; void main(){ int day,month,year; cout<<"enter day"; cin>>day; cout<<"enter month"; cin>>month; cout<<"...
[4 replies] Last: whoops, my bad. add }while(0); after line 23, and change line 23 to:... (by rocketboy9000)
trouble with vectors
 
I'm having trouble with a vector which contains objects of class type Card (a class I needed to write myself). While troubleshooting I found that the vector ha...
[2 replies] Last: That worked perfectly. Thank you very much. (by alex473x)
combinations of numbers
 
hello, i search for a code that finds the combinations of numbers for example if the numbers are [2 4 3] the combinations of those numbers with at pairs ...
[14 replies] Last: [quote=vagelis]i want a solution I already told you many times that ... (by m4ster r0shi)
by si666
Reading hex patterns with unknown charecters
 
I want to make a program which reads .bin files which I want to find occurrences of certain patterns of Hex. I know the first 2 bytes and I know the total num...
[1 reply] : One step at a time. read from file, until you find 0x12. when you do,... (by hamsterman)
again with the combinations programm..
 
hello again.. i want to make a programm to find all the combinations of n numbers choosing the k of them for example [1 2 3 4 5] the combinations of...
[2 replies] Last: my friend i try in this case to find the combinations of 2 numbers of ... (by vagelis)
Movement In a Grid (Array)
 
Hello everyone. I have a project that requires me to build a gameboard, with two units in the board, and be able to move and fire at each other. The grid is ...
[10 replies] Last: Ok well i fixed my array. I can now display it again. However, when it... (by thedude11)
by primes
assignment paper anyone who can solve it?
 
gfdsf
[1 reply] : Oh, this is delicious. Apparently you never read the assignment and... (by Athar)
by axlmh
problem reading file
 
hi, I have this code and it reads the file, but it keeps printing the last character of the file forever, how can I make it stop? ifstream file; fil...
[3 replies] Last: ok, problem solved, thanks ifstream file; file.open("filename... (by axlmh)
File open problem
 
Hi, I am in C++ class, and my problem is when collecting numbers from a file and assigning them to different arrays. Here is the part of the program with th...
[6 replies] Last: There wasn't an empty line. I wonder if the problem is just with my c... (by zimbloggy)
Debug compiles, Release doesn't: _ITERATOR_DEBUG_LEVEL?
 
I want to test an early version of my program on a different machine, so I switched the solution type to Release in VC++ 2010. Trying to compile this, I get a b...
[1 reply] : You're probably trying to link modules that were compiled in debug mod... (by Athar)
December 2010 Pages: 1... 1112131415... 24
  Archived months: [nov2010] [jan2011]

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