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

Array of string arrays
 
Hi, I need to define an array of (c)string arrays as a static class member. I tried the following: //MyClass.h typedef const char * LPCChar class M...
[2 replies] Last: Oh, so I just confused the order of brackets. What a silly mistake... ... (by Baltram)
Eclipse vs MS Visual Studio - which do you use and why?
 
I'd be interested to hear your views on which IDE is best for C++ development - Eclipse or MS Visual Studio. What are the positives of each and what are the neg...
[3 replies] Last: Code::Blocks is best and cross-platform IDE. (by ayhanakbulut)
Optimizing Speed (1,2,3)
 
I'm just looking for general ways to optimize the speed of a program. I can't post the code, so don't ask. I just want any generic rules I can go by. Also, h...
[43 replies] Last: Perhaps the only reason I can think of would be to avoid having to rew... (by wtf)
by Xzi
Having trouble sorting 2 arrays in a heap sort. Assistance?
 
My program is supposed to sort some information by the college then by the city. The problem is I can't get it to sort by the city right yet. Here's my code: ...
[3 replies] Last: Ok I did a little searching and I found them. (by Xzi)
taco
 
... Error 2 error LNK2019: unresolved external symbol "public: void __thiscall Graphics::Primitive<struct ColorVertex>::AddIndex(unsigned short)" (?AddIndex@?$...
[4 replies] Last: templated functions are the prototype including their body. The comp... (by coder777)
by phadeb
Splitting files and regrouping splitted files
 
Hello again, I'm trying to split a file in chunks, and regrouping the chunks later, but i don't know what is going wrong. - The main function splits a fil...
[1 reply] : You do realise that you can split files with split and put them back... (by kbw)
Inheration and Iteration
 
I need to create 2 programs that have the same function, the first one use inheration, and the second use iteration. can anyone help me? and also can anyone ...
[4 replies] Last: thanks! (by iamamateur)
Removing the duplicates of a word sorting program
 
I was asked to make a program that sorts the words of a text (ascending) and remove the duplicate words. I manage to sort the words but can't remove the duplica...
[2 replies] Last: To remove duplicates, you only need to compare a word with the next on... (by kbw)
by Skynet
Building Blocks
 
Hey all, I was wondering if you could help me with building blocks. I have this that I have to do. I have to assume a child is building blocks and that I want t...
[1 reply] : i think,you should use "Class Stack" (by tuandt5)
Checking if image url exists
 
Hi there. I just completed my first Object Oriented Programming class with an A- and I want to create my own program. The only problem I'm running into is ho...
[1 reply] : You could use a library such as libcurl, but that might be overkill if... (by Athar)
Abusing the gnu extensions.
 
This is an interesting thing I found while fiddling with the gnu extensions, in particular the compound statement expressions. i.e. ({code;}) Here it is: #...
[5 replies] Last: And the moral of the story is avoid goto statements like plague :P ... (by sohguanh)
by phadeb
Problem : File opening with a variable containing a string
 
Hello everybody, This code works : ofstream result("jonathan.txt"); Why not this one ? string name = "jonathan"; string resultFile = nam...
[5 replies] Last: casting operators are error prone, though. But yeah they could've don... (by Disch)
by alnews
[C++] How to correctly allocate dynamically an array of dynamic elements
 
Hi guys,I need some help to well understand how to declare dynamically an array of records, where each of them is also allocated dynamically. I'll try to bet...
[4 replies] Last: typedef PrPtr Array ; // This should define a DIM-sized array of poin... (by ne555)
concatenation string
 
I am trying to write a concatenation string to satisfy this requirement: use string concatenation to connect a city name, state name, and zip code into one s...
[2 replies] Last: the string operators are overloaded so you can just add together strin... (by quirkyusername)
multiple forms
 
what are the pros and cons about multiple forms?
[1 reply] : What? (by Athar)
Array/Equivalents Question
 
Guys, I need help with this problem if anyone can possibly tell me what the answer is and why. I would greatly appreciate the help here. Original question in...
[5 replies] Last: thank you, now it clicked ^^ (by Aenimate)
by wtf
Weird Problem with console buffer, but only after 30 iterations of some loop.
 
Ok you see I have this problem. I have been using GetConsoleScreenBufferInfo() and SetConsoleCursorPosition() repeatedly cout random numbers to the same spot o...
[no replies]
Subclassing ifstream.
 
Hello. I am creating a subclass of ifstream. It's sole purpose is to create a new function peek(n), which allows me to peek n characters ahead instead of just...
[3 replies] Last: Thanks Galik. I thought my correction worked, but it doesn't now. ... (by ToyYoda)
Question about using pointer with reference
 
Hi everyone! I have problems in using pointer with reference. So, I make simple program to clarify them. First of all, this is my code and its output. Ple...
[3 replies] Last: I have no idea what it means to cast a variable to a reference. It do... (by PanGalactic)
by mitko
"extract" a part of an array
 
Hello, I have an array or doubles (e.g., double H ;) which is used to store a symmetric matrix H = 0.0; H = 1.0; H = 2.0; H = 1.0; H = 3.0; H = 4...
[3 replies] Last: As I see, I am not missing something obvious. So I will stick to memcp... (by mitko)
December 2010 Pages: 1... 1516171819... 24
  Archived months: [nov2010] [jan2011]

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