General C++ Programming - April 2010 (Page 2)

Pointer Best Practice's
 
Hi Guys, Just a quick one really. In a basic class defined as below: template<class T> class Foo { public: // construct, copy, destroy... // not n...
[2 replies] Last: Thank you - your answer was very helpful. Regards, Phil. (by Philip Lee Bridson)
Bitwise Operators and Exceptions
 
Hello Everyone! I am currently working on a bitwise operators program where I just need to display the bitwise AND, OR, and EXCLUSIVE OR, of two integers tha...
[4 replies] Last: ok...i don't know if that is a problem or not but i can try it.. (by ohsnap1319)
by fikri
can you guys explain this c++ program line by line?
 
include<iostream.h> #include<string.h> void horoscope(); void bulan(); void main() { int month; char horoscope ={'W','E','L','C','O','M','E… char j...
[4 replies] Last: It's all right, I just hope it works for you :) Btw it would have b... (by joro550)
how to access excel-sheet via c++...??
 
hi friends, i'm c++ coder so i'm finding code for access excel sheet through c++ code ... i'm using MS visual c++ 2008 compiler ... and win32 console appli...
[no replies]
by ALB
Pointers and Linked lists
 
How would u write an function that Write_records using an Linked list? looks like void write_records(SalesRecordPtr head, int n) // Save records to file ...
[1 reply] : This is a great place to start with linked lists. - http://richardbowl... (by Mythios)
date / time
 
how can i work with dates to get the number of days from today until A date in future?
[1 reply] : You can try this: http://www.cplusplus.com/reference/clibrary/ctime/di... (by Bazzy)
queue
 
Hi, When I try to run the below code, there's an error. The compiler just hanged on me. Any idea what is wrong? #include <iostream> using namespace std;...
[6 replies] Last: #include<iostream> using namespace std; const int MAXQUEUE = 20; ... (by qabil)
How will distunguish between and setup file and exe(application) file
 
I experts I just want an if else That i want to distinguish between a normal appliaction exe and a setup how can i compare this any solution ...
[no replies]
by sporx
choosing the best search algorithm
 
Hi, ive been doing some research trying to figure out when different search algorithms are appropriate to use. Googling around, im really not coming up with muc...
[8 replies] Last: if you have an already sorted list , then binary search algorithm is b... (by paritosh)
Binary Tree Game
 
I need to create a binary tree game where the program asks the user a question and the users response is yes or no. From there the program will either ask anoth...
[2 replies] Last: You could also set the at as a static variable in ask... (by attaboy)
error LNK2001: unresolved external symbol
 
hi i just installed the visual studio 2010 when i run my project (that fully compiled with vs 2008 without any error ) i get following : 1>------ Buil...
[5 replies] Last: why? what is that? im using visual studio 2010 right now (by Placebo)
cant figure out whats wrong with my graphs
 
hello all; this is the code that I'm getting. http://i109.photobucket.com/albums/n...z13/graph1.jpg this is what it should look like: http://i109.photobucke...
[4 replies] Last: if u copy and past the above code into C++, u can see the warnings, th... (by C 123456789)
by peaco
Problem with heap and heapsort
 
So our assignment was to generate 30 random integers (from 10-200) and insert them into our heap class and display the heap. Then we are to remove the max one b...
[1 reply] : Hm.. are you sure about your heap operations? AFAIK you have to move e... (by imi)
by Uni616
Min-heap extract min not working correctly
 
Hey, I have to code a min-heap, along with other things to help compute minimum spanning tree. I coded up the min-heap pretty easily and I have no compile e...
[no replies]
Encryptor/Decryptor based on Password
 
I am trying to write a program that asks the user to enter a message, then asks the user to enter a password 1-100. Then it encrypts the message based on ASCII ...
[2 replies] Last: http://cplusplus.com/forum/general/23037/ (by blackcoder41)
by bryan
Pointer to string
 
How do i set the output to: each string character + number( encryption code input by user) EX: A(ASCII =65) 17( input by user) output: R (ASCII 82) Here ...
[2 replies] Last: Thank you very much!!!!!!!! It works (by bryan)
Error "Floating point exception" Prime listing program
 
I am working on a way to efficiently check to see if an integer is prime, mainly by checking to see if it is divisible by all the primes that preceede the inter...
[2 replies] Last: As kbw says line 55 produces a warning "converting a double to int" bu... (by buffbill)
What's wrong with this function definition? (Stacks/queues)
 
#ifndef ASSIGNMENT4_H_ #define ASSIGNMENT4_H_ namespace assignment4 { #include <vector> #include <stack> #include <queue> typedef bool boolean...
[1 reply] : stack and queue are all declared in the std namespace. You'll want ... (by jsmith)
g++ link c++ object to c main
 
Can anyone help me with the compile line(s) to link a c++ object file generated from a .cc to a c main? Thanks!
[3 replies] Last: Ah... then we'll need to see your code, sah. :) -Albatross P.S.-... (by Albatross)
by jrohde
Error checking with strtol()
 
How do I know whether a return value of 0 from strtol() indicates an error, or simply that the input string was "0"? If string parsing is necessary, this becom...
[1 reply] : strtol return 0 both if input was bad or it was an actual "0". If you... (by Bazzy)
April 2010 Pages: 1234... 24
  Archived months: [mar2010] [may2010]

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