General C++ Programming - April 2013 (Page 10)

Runtime error in hash table
 
I am getting a strange runtime error when trying to run my hash table program. I have it separated in 3 separate files. I believe I have narrowed down where the...
[1 reply] : inline HTable::HTable() { TABLESIZE=33; vector<list<string>> ht (T... (by cire)
What exactly is "Binding Time?"
 
What do we mean by "Binding Time?" And what does it have to do with recursion? I have no knowledge on this binding time statement, can anyone explain?
[2 replies] Last: We can use a name (or identifier) to refer to an entity. For instance,... (by JLBorges)
Error message
 
I have some source code which were build in Microsoft visual studio 6.0, this moment I am using Microsoft Visual studio Express 2012 to compile this program. ...
[1 reply] : Have you bothered to do a search? Try here: http://goo.gl/anFF0 (by AdrianH)
by kcpolo
callback for a button
 
I have made a calendar that looks similar to Outlook, and I have the next/previous buttons, but they don't do anything when you click them. Could you help me fi...
[4 replies] Last: Okay, thank you! (by kcpolo)
by Ram666
Coloring cells in HTML table
 
For this program i had to create an HTML with the cosine similarities. I got everything, i just need to color in the lowest and highest amount in the table, but...
[3 replies] Last: int lowest = myValues ; int highest = myValues ; for (int i = 0; i ... (by Zaita)
Array help please
 
#include <iostream> #include <iomanip> using namespace std; void get_emp_rec(int &id, double &prate, double &hours) { cout << "Employee ID is:\...
[7 replies] Last: The 1.4 is an example value. If you run that code the output is: 1.4... (by Zaita)
String Erase commands
 
I have gone over the commands for string.erase and searched for how to do all the things one can with that command but I recall, maybe a year ago or so, that th...
[9 replies] Last: I was thinking that the "npos" caused by the if statement was...i gues... (by dalydir)
Works on Solaris but not on Linux ! Any idea why?
 
Hi, I have this following piece of code: int id = 5; const char *ptrId; ptrId = ( int_to_str(id) ).getPtr(); // Works in Solaris well But t...
[2 replies] Last: Undefined behavior will not produce the same results on every kind of ... (by kempofighter)
No of sequence in an array.
 
I am trying to write a program that checks whether the number is in sequence(as in if the numbers are in order it is a sequence). Ex: If the numbers are { 1,2,3...
[2 replies] Last: You should write out in pseudo-code what you need to achieve, then tra... (by Zaita)
Quadratic probing
 
How would i go about reimplementing this so it used quadratic probing? Do i just change the insert function or is there more to it? Do i have to reimplement the...
[1 reply] : I'm not sure if I should help you too much since we both have the same... (by DeNial)
Rock Paper Scissors
 
could somone tell me how i could get this going. #include <iostream> #include <ctime> #include <string> #include <cstdlib> using namespace std; enu...
[5 replies] Last: Um... you mean, you haven't already? You've written code that's calli... (by MikeyBoy)
by Tresky
Building Objects
 
I have a class that is used to build another object. However, there are two methods of building this object that I can't decide between. Which method would pote...
[1 reply] : In the first example I think Built should declare Builder as a friend,... (by booradley60)
by Tresky
Return Local Pointer
 
Hey guys. I hear all the time about the rule of not returning a local pointer, but I'm not exactly sure what that insinuates. Would this example be classifi...
[3 replies] Last: Thanks guys! Great help. :) (by Tresky)
Dinamic size of a matrix
 
Hi everyone, My purpose is to fill a matrix with random numbers. As you can see in the code, I defined a matrix called sim_matrix (which should be filled), but...
[2 replies] Last: Oh, thanks! I didnt know such dynamic creation object...I'm gonna look... (by katalan7)
First real program
 
I have been doing c++ for about 10 days now and I made this little calculator Sorry, but I think there are alot of spelling mistakes, im from Norway and im onl...
[5 replies] Last: Calling main() is bad because the C++ standard (the document that spec... (by Peter87)
"error: no match for 'operator>>' in 'std::cout >> num'"?
 
This is the only error I've been getting for my program to generate random numbers between 1 and 9, display them and tell how many numbers it took to get a zero...
[2 replies] Last: Thanks. I'm just retarded sometimes, I forgot which one to use. (by mjhenre)
SPOJ: PARTY (spoiler alert)
 
I have coded a solution to the problem: http://www.spoj.com/problems/PARTY/ and I have tried a 0-1 knapsack algorithm that remembers its picks. Is this the corr...
[7 replies] Last: No, no. You're right. It does terminate the loop correctly. I guess... (by cire)
help please
 
can someone please tell me what im doing wrong im trying to find total gross for department entered but it keeps giving me a total gross for every department an...
[2 replies] Last: thankyou I got it working been trying to figure it out for 2 days now... (by Allan Walls)
by hasak
Little program
 
How to when i press number 1 on keyboard to do something in program, but not to press 1 then enter ??? e.g. If you want to print press 1 if you want to ...
[2 replies] Last: you can also include <conio.h> or <windows.h> and use the function 'ge... (by sycamoreent)
by hannah
3 Dimensional collision detection
 
solved
[2 replies] Last: "Move with line." ? (by keskiverto)
April 2013 Pages: 1... 89101112... 53
  Archived months: [mar2013] [may2013]

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