One idea could be to solve certain programming challenges.
Such a site that could help you along is Sphere Online Judge (SPOJ) - Problems
Type: Posts; User: rodrigorules
One idea could be to solve certain programming challenges.
Such a site that could help you along is Sphere Online Judge (SPOJ) - Problems
Imanuel, you're right in thinking that it does not free the memory from each of your nodes.
If you want to make sure this happens on 'delete' or when your list goes out of scope, look into...
Just to clarify, when you typed:
int* leftTriAbscissa,rightTriAbscissa;
You made 2 variables, one of them was a pointer, the other was a regular int.
So your original code was the same...
Yep, your thinking is correct that it's a 'single' stack as well.
Whenever an ACM contest concludes the judges post solutions on the contest website. All of these are easily found on google *if* you know the problem title you're interested in.
Ah, bad habit. You can do without it since we know that the array will be a constant size of 26.
It could be simply that the class set method doesn't work. Try to use a debugging tool?
just_rookie, it looks like the logic you have in your previous post's code is correct.
What is the problem?
You want to 'map' each character in the alphabet to your own 'encoding'.
1) Read in the first line in your file
2) Iterate over each character in the line
3) Store each character in an array...
I think the responses to his question have gotten far too complicated. (it's clear the original poster does not yet understand references &, etc etc, so I hope this explanation is much clearer) (Even...
Don't choose a school because it has a game programming course!
Is there such a function in C/C++ for resizing of arrays called 'resize'? Google doesn't help me find it, I want to guess it doesn't exist.
Great suggestion laserlight.
just_rookie if you would like to 'roll your own', just iterate over the array and check if the current element is 'less than' the next element. If you receive true...
Hi, I am trying to use the 'find' function from the STL algorithms library on 'string' by using iterators only
(I am aware that string::find exists)
I am having trouble getting this to...
If I return a gigantic vector of integers from a function, am I better off just passing a reference to the function instead and having it filled that way? I'm wondering if returning a vector that...
Yea, I tend to try to get in the habit of writing like that though ... most of the only reason I program is to solve little programming puzzles
THANKS!
int var = 1;
if(var == 1)
{
}
if(var)
{
}
make sure your complier linker settings include these libraries, not just in the code itself.
look up the jpeg protocol
i would just find a nice library to read a jpg.
if your using gcc add the -g flag so you can debug using GDB
ex:
g++ d_arr.cpp -g -o d_arr
gdb d_arr
yep, im guessing thats not the complete code
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
ifstream in("c.cpp");//file path
if(!in.good())
when you write out strings " ... " , you cant press [enter] in the middle of writing a string.
put it all on 1 line
I've been having some trouble trying to use the STL algorithms on a set of my own struct, I've never had a problem using STL with primitive types ... do I need to overload comparison operators for...
yea we understand what you have to do