General C++ Programming - September 2012 (Page 16)

using #define over const?
 
i find #define simple and more organized to declare my constants, but what advantages does const have over #define if any?
[2 replies] Last: That was an eye opener, really appreciate the input on this subject. I... (by Need4Sleep)
Passing Arrays by Reference
 
Does that work? I would like to run some code in the main, then it jumps to a void, where an array is given its ints, then it should return to the int main () w...
[13 replies] Last: I know you are not a physician (unless you mean doctor of computer sci... (by closed account o1vk4iN6)
Is there an Interlocked for this?
 
Please note - these builds are for VS2008/VS2010 builds I cannot use any 11 constructs. Imagine I have subscribers listening to some publisher. My publisher h...
[no replies]
by Xyexs
Project is not compiled
 
#include <iostream> #include <ctime> #include <string> #include <string.h> #include <stdio.h> int main() { using namespace std; srand(time(NULL)); ...
[10 replies] Last: This compiled for me (The OP, not the Hello world) in VS2010. However... (by Stewbond)
Run Time Error with Hash Program using Separate Chaining
 
I have a run time error when I instantiate an object in a PhoneBook class which is an array of doubly linked lists. The code is shown below and the error one l...
[4 replies] Last: That was a good catch. My program is setup for people entering 10 digi... (by victorolvera)
by ap28
Print PDF
 
Hey friends, I would greatly appreciate some help with my question. I am really stumped why my code below does not print. I am using C++ 6.0 and all I want...
[2 replies] Last: Thanks for the research and the information! It is greatly appreciate... (by ap28)
Help! Urgent. I can not display the results in this personality test.
 
#include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; int getA(); int getB(); int getC(); int solveA(int a,int b,int c); i...
[2 replies] Last: It is interesting what does mean the words "I can not display the resu... (by vlad from moscow)
by tambun
5 numbers
 
hello guys...i've question to ask... there are 5 numbers given.. 10,8,3,6,15 how to do the coding to determine which one is the smallest and biggest numbe...
[7 replies] Last: I guess the best route would be to initialize both to the first value... (by TheIdeasMan)
Not being able to play video using SDL
 
Hello All, I am trying to run a video, a slideshow and a text on the same screen using SDL. I have successfully created standalone application for the ind...
[no replies]
Experimental Wire Like Game
 
A very simple console game that places and removes wires. Not finished(organizing needed)!! Controls: Q W E A S D Move:ASDW Place Wire:E Remove Wire:Q ...
[8 replies] Last: With the updatewires function: The first condition is either w [cur... (by TheIdeasMan)
getters & setters are evil - do I have the right idea? (1,2)
 
I have read some of the other threads about this subject, and the link http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html?page=1 provided ...
[27 replies] Last: @clanmjc, Thanks for that, it worked really well - ThingsLearnt++; ... (by TheIdeasMan)
pow() function error
 
Hi, i have this sinppit of code to get all the individual digits in a number. float tempNumber = 011010 for (short i = 6; i > 0; i--) { cout << (s...
[5 replies] Last: Peter87 wrote: A number literal starting with 0 is an octal number. 0... (by TheIdeasMan)
by tambun
switch
 
hi everyone...i want to ask for your help in my programming problem here.. this coding i made can be compiled, but it can't run properly...so, your help would ...
[2 replies] Last: thnx man..:) (by tambun)
how to use If else stament
 
I have to create a earnings yield calculator and here is what I have so far. But i want to be able to calculate when Profit and Shares Outstanding are missing. ...
[no replies]
by manudo
Clear screen instruction
 
I use Dev-C++ compiler in Windows, and I want to use the clear screen instruction. I've tried the <conio.h> getchar(); and the <stdlib.h> system("clear"); instr...
[8 replies] Last: Yeah, but that instruction isn't for clearing screen, just printing a ... (by manudo)
by Spht
Recursive Programing Help Please
 
New poster to these forums and I'm a bit stuck on this one problem I have for my CIS class. My code for this problem is probably pretty bad at the moment as Im ...
[2 replies] Last: Thanks for your help. Makes sense to me now. (by Spht)
Temperature Converter (Release)
 
This program can convert temperatures between the C,F,&K scales. After the conversion is made, it pauses, clears the screen, and then restarts main() for a new ...
[2 replies] Last: Second the loop. You're not allowed to call main. You need to put th... (by cire)
by manudo
If problem
 
I have a problem with my code because it doesn't work as I want to. Here's the code. #include <stdio.h> #include <stdlib.h> int main() { int st, n...
[2 replies] Last: Now works, thank you man! :) (by manudo)
by Handzo
Data structure "Tree" need some help
 
Hi guys! I wanna create a "Tree" for reading *xml files. Can't figure out how many and what kind of links and data i should have into my structure "XML_Tree". H...
[4 replies] Last: struct atrElem { wchar_t atrName ; wchar_t atrValue ; at... (by Handzo)
Leap year error!! plzz help!
 
// Enter a number and this indicates if it is a leap year #include <iostream> using namespace std; int main () { //loop answer char ans; ...
[4 replies] Last: Wow!!!!! lol thank you soo much.. what a simple error! :D (by insane24illusions)
September 2012 Pages: 1... 1415161718... 32
  Archived months: [aug2012] [oct2012]

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