General C++ Programming - January 2014 (Page 2)

Problem writing my class
 
#include <iostream> #include <string> #include <fstream> #include <cstdlib> #include <cstring> using namespace std; class loc { public: int cou...
[6 replies] Last: How could I make it so that it counts those executable lines? (by cppnoob25)
by Jarl
Finished Accelerated C++.. Now what?
 
After two weeks, I've finally finished my first book, Accelerated C++, for my first language. Now I want to expand on my C++ proficiency. Where should I begin? ...
[2 replies] Last: > Ultimately, my real interest in programming is to be able to create ... (by JLBorges)
Can this code be modified for hash usage
 
Hi Fellow programmers, I was implementing hash map using ordered map. I was reading online about std::hash function and I did not know how to use it here. Can ...
[1 reply] : std::unordered_map implements a hash map already and uses std::hash... (by LB)
Pointer Point to Pointer?
 
Is this the correct format to point a pointer (pointer1) to another pointer (pointer2)? &pointer1 = &pointer2 Im kinda rusty when it comes to pointers :P...
[2 replies] Last: Thanks! (by jsbrowndog2013)
template class
 
I have a doubly linked list and I insert different data items into the nodes. All works fine! The structure is identical for different category items. Is it pos...
[5 replies] Last: reply for Tom B I hope I do this correctly, never posted code so here ... (by Steven66)
random() - can't use in C::B
 
I'm unable to use the function random(num); in Code::Blocks. it shows the error : error: 'random' was not declared in this scope while the same code work...
[6 replies] Last: for this i have to study the <wincrypt.h> library first and it is la... (by NPcomplete)
Test Programs
 
I am currently trying to write a test program involving constructors. I know what I am about to ask is pretty basic stuff but Visual Studio is not recognizing w...
[2 replies] Last: o.o wow. Well then this is embarrassing but thanks lol (by Opjeezzeey)
Open jpg file using shellexecute
 
I'm working on a deck shuffler. As a card is drawn the jpg file will be opened in a new window. I'm trying to use ShellExecuteA. My code compiles but the fil...
[no replies]
Guess-my-number Program
 
I'm trying to get a guess-my-number project to work, but attempting to get it to loop results in errors. Maybe my method of looping it doesn't work. Sorry, I'm ...
[1 reply] : Right now, your only loop is for(int index=0; index<20; index++) ... (by long double main)
IDL FIX Equivalent
 
Hey, I was wondering if there was some sort of C++ equivalent for the IDL FIX function. For example, say I want to find all the elements of FLOAT ARRAY1 th...
[1 reply] : Are you limited to arrays or can you use vectors? Each time a number i... (by Danny Toledo)
Calculator program
 
Hey guys, I cannot figure out how to fix this to where it works. I am supposed to get 2 numbers then have the person choose what they want to do to the numbers....
[3 replies] Last: Also, don't ever call the main function - it's special. Instead set up... (by TheIdeasMan)
by Chubby
srand problem?
 
I want to be 30 numbers not 29! I knew that if we do rand() %30 +1 will count the last number too.... "For" Loop i try <= and < doesnt work? can someone give a ...
[1 reply] : % gives you the remainder after division. So 7%3 == 1 because 7/3 giv... (by Disch)
Point-to-Int
 
I ran into this question If p is a pointer-to-int variable with the current value 440, and the size of an int on our system is 8 bytes. What is the value of ...
[6 replies] Last: So it's 448 gosh I feel stupid right now... Thanks for the help guys! (by ImperfectCoder)
Reading csv file
 
hi, how do i search a csv file?. I have a table with 3 columns (Employee ID , salary ,grade ) If i will enter an Employee ID and it should return the salary a...
[2 replies] Last: However, the serialization exists only on a per-record basis. It wou... (by Duthomhas)
Why am I getting this error?
 
Hi, i'm getting cannot call member function 'double InternetCharge::calcPlanCharge(int)' without object for my function 'void displayBetterPlans(), and I ...
[9 replies] Last: Damn, I got it all wrong... I thought you couldn't call nonstatic func... (by maeriden)
by Renato
Open and store a value to the text file
 
This my deposit function, i want to open the file (balance), then add the sum and store in on the text file. float deposit( int x, int currentBalance) { ...
[13 replies] Last: How are you setting the value for currentBalance ? (by Garion)
Need to understand this question
 
Hi, First of all sorry for indirect/inexact title of this post. (I wrote it like that intentionally for a reason) Now coming to the business, there is a questi...
[5 replies] Last: happy to help. =) (by Disch)
How to fix this simple script?!
 
Hello again :p I coded this in order to sum two maximum 50 digits number (eg: 100000000000000000... + 10000000000000000... ) So I made an array like this " A ...
[5 replies] Last: Just fixed it (without strings!), that was easy..... well medium for m... (by D4N005H)
Game
 
Hi. I'm start now in C++. I made 2 array val e sem . There is a method to made a multidimension array paper or unidimension paper ? Example in array val...
[1 reply] : Please take a look here: http://www.cplusplus.com/doc/tutorial/array... (by condor)
Still can`t get clang++ to work
 
So I made a post some time ago about clang++ on code::blocks and someone(I don`t know who) showed me a website, after following instructions, it still dosnt wor...
[3 replies] Last: sorry! no idea. same problem with me while trying to use SFML on C::B ... (by NPcomplete)
January 2014 Pages: 1234... 25
  Archived months: [dec2013] [feb2014]

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