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

moving a constant twodimensional array into an doublepointed int array
 
int ** map; int mapWidth,mapHeight; const int defaultWidth = 52; const int defaultHeight = 13; this->mapHeight = defaultHeight -1; this->mapWidth ...
[1 reply] : it works. the broken part is drawMap(). I don't know what you want it ... (by hamsterman)
Quick question regarding text files and arrays
 
How would I go about taking data from a text file and writing the two separate columns to two separate arrays? Here's the data: 2010 79 2597 90 2384 6...
[2 replies] Last: #include <windows.h> #include <iostream> #include <iterator> #in... (by aj3423)
SDL screen intialization
 
This is my first post, so I apologize ahead of time, but hopefully you can help. I've recently been working with SDL, using the lazy foo' tutorials like ever...
[1 reply] : well, nevermind.. I was, for some reason, managing to refer to back to... (by fhornplayer)
by jlcvt
current date for function
 
I need to find the current date and use it in a function, not display it. Everything I found so far just displays the current date and will not let me use it to...
[4 replies] Last: All the standard C and C++ time functions are found in <ctime> http:/... (by Duthomhas)
Using values from txt
 
My question may sounds stupid, but I am a newbie in programming, so any help will be appreciated. I have a txt file of number coordinates written in the foll...
[2 replies] Last: Thanks for your advice, I have got it done =] (by edmundlau)
Array of Characters question
 
Im not sure how i would go about it, but how would I go about taking an array with multiple words in it, and returning one of the words?
[4 replies] Last: Sorry, so i guess i need to know how to read the second word in an arr... (by fatfreeninja)
Find contents in C++ data structures
 
We have list.contains() methods in C# which enables user to search specified content in given list.I just want to know which data structure in C++ offers same f...
[1 reply] : http://www.cplusplus.com/reference/algorithm/find_if/ http://www.cp... (by sohguanh)
Can anyone assist in checking my code Please- Counters
 
I would appreciate a lot if anyone please just confirm that my code does as the example says: This is just part of a code so not to worry much about before or o...
[1 reply] : [co de] Your code goes here [/co de] The language(?) is case sens... (by ne555)
Making The Program Type Slowly
 
Hello! I'm kind of new to this C++ stuff and I would like to know whether there is a way that a program can type slowly like it is being typed by a human. ...
[4 replies] Last: Thank you very much shredded! It really does work! (by Wongfive)
Return by const ref or value?
 
Hey everyone :) I just want to confirm if my understanding is correct. class Test{ UserDefinedType a; public: Test(UserDefinedType aArg) : a(a...
[9 replies] Last: And throughout all our try-out "assign called!" is not output. So it m... (by sohguanh)
double for loop with specific values
 
i want to find the sum of all elemnts of a vector<vector<int>> States //two dimensions table in the rows that are specified from the vector<int> a; //for ex...
[7 replies] Last: Although those standard makers add reference into C++, it is a contro... (by sohguanh)
Class/Subclass as Arguments
 
#include <cstdlib> #include <iostream> using namespace std; class c1 { protected: int i1; public: c1(){}; c1(int i...
[4 replies] Last: Is that polymorphism. I want to use the exact same public member funct... (by mothmann)
toupper()
 
Have a choice to input 3 letters S or P or Q. I need to convert them to upper if user inputs lower cased letters.
[7 replies] Last: Yes sorry, i forgot to mention the fail safes. (by leecheneler)
Sorting a deque of struct pointers
 
I'm attempting to sort a deque list containing a set of structures. The structure is declared as follows: struct coords { int x; int y; in...
[4 replies] Last: Thanks sohguanh for your adding. b2ee (by b2ee)
Command Line Menu
 
I need some help creating a command line menu for a program I already have created. I have screen shots to show what it needs to mimic. Any help will be greatly...
[6 replies] Last: echo is the std::cout of batch files ;) But @echo is what you wil... (by thenewguy)
Compliler Error
 
Ok What does the compiler error mean when it says multiple definition of `Resistance::Resistance(double, double, std::string*, std::string, double)' first...
[3 replies] Last: tyvm sliced, that worked perfectly. (by yoslick11)
by wtf
How to resynch cout and stdio
 
#include <iostream> bool toggle_sync() { bool init; if (init = std::ios::sync_with_stdio()) std::ios::sync_with_stdio(false); else ...
[no replies]
Child class access in Parent class
 
Hello,I have parent class and it's child. In the parent class I want to create List of child class objects. How it's possible to do? e.g. class GalaxyClu...
[2 replies] Last: Thx for reply. It makes sense :) I'll try other way (by Kirstone)
by wtf
Is it possible to make a copy of cin?
 
I have a function that now gives me the size of the cin.buffer, but it empties cin in the process. Could I make a copy of cin such as like this: istream co...
[6 replies] Last: Problem solved. I think. #include <iostream> #include <strin... (by wtf)
File Input with 2D dynamic char array
 
I need to write a program which compares a string of numbers such as "256432" with an entire list of numbers located on a separate text file. There's about ...
[7 replies] Last: Thanks for that! Gave me some great insight. (by danG1991)
December 2010 Pages: 1... 1617181920... 24
  Archived months: [nov2010] [jan2011]

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