Beginners - July 2011 (Page 23)

C++ undefined reference and exit error...plz help?
 
I'm using Dev C++ compiler. I keep getting these two errors. [Linker error] undefined reference to `taxAmount(int, double, double, int)' and ld returned 1...
[11 replies] Last: taxAmount is a function, not a variable... so maybe that's how OP tr... (by Catfish)
by Peyton
Complex Square Root
 
Hi, I'm just wanting to write a program that requests the integers a, b and c from the user, calculates the roots and displays the result(s). I get (nan, ...
[5 replies] Last: I use a different compiler, so I can't be sure, but try replacing 2 wi... (by hamsterman)
string to int
 
Im trying to writn stirng to int funtion for my string class. Its for learnig purpose. but i cant seem to find the correct thing to add into atoi. class Str...
[8 replies] Last: i have forgottne how to call my cti function If you have it accordi... (by coder777)
help!
 
how can I stop this loop? getline is not reading until the end of the file like it should, and I don't know how to break the while loop. Please help! #includ...
[3 replies] Last: while(!fin.eof()){....} http://www.cplusplus.com/forum/beginner/3... (by muratagenc)
custom strcat() question, is this code safe?
 
I got the following code from a book, it works but I don't think it's a safe function. Why? let me put the code first; void myStrCat (char * s1, char * s2, i...
[6 replies] Last: great tips, thanks. I also like the comment This is a minor auxiliar... (by muratagenc)
logical operations for const char *
 
I have a simple question! why is this not true? (d == "cplusplus") when const char *d = "cplusplus"; how should I do the comparison then?
[8 replies] Last: Apparently! (by Nisheeth)
Writing to a file, need help
 
well, I'm trying to learn how to write binary files, and I seem to have hit a snag. void save() { fstream myFile ("data.bin", ios::in | ios::out | ios:...
[15 replies] Last: So better use the stream mechanism. You can overload the << and >> ope... (by coder777)
I get an illegal initalization
 
#include <iostream> using namespace std; #include <string> class Event { public: void setEventData(string eventName, int hour, int minute, int ...
[3 replies] Last: that's related to pan's reply. you did define the class but after you ... (by chipp)
Review of two simple function templates
 
Hi forum, First post here. I trying to learn myself C++ by writing small programs, which solves some of the problems at Project Euler (http://projecteuler.ne...
[6 replies] Last: It won't yield any overhead because gcd_helper's constructor does n... (by Slaunger)
Need help with an array
 
Hello everyone, I am trying to make the number of days in a month display when the user enters the month (1-12). For example, if the user enters the number 2, ...
[2 replies] Last: Here's how I'd do it: int main() { int month = 0; cout << "... (by creekist)
Random Number Generator
 
I created this program for a class assignment and it works fine but I noticed that sometimes it will return 2 of the same numbers in the same run. Is there a wa...
[5 replies] Last: That's what he's doing, creekist. The problem is he needs numbers wit... (by Disch)
Nested loops not incrementing
 
Hi I am trying to make a nested loop that builds a triangle with the height based on user input. The trouble is none of my for loops seem to be incrementing. I ...
[2 replies] Last: Take a look at line 24, you are saying as long as ast is equal heightt... (by twentfiveu)
need help passing a stream to a function
 
I'm trying to get a function to use and add to an fstream, but it doesn't seem to work. Here's what I've got so far: void append_log() { fstream out(lo...
[4 replies] Last: hamsterman, that snippet ran fine. I did some looking and it turns out... (by ausairman)
Have Problem
 
#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv ) { string answer; cout<< "what is your favorite book?\n"; ...
[5 replies] Last: Yes. It does. Thank you, though. (by kyranstar)
Where to learn GUI?
 
I can't seem to find anything helpful. I'm using Visual Studio 2011 (c++).
[2 replies] Last: visual c++ is GUI oriented. also i hope you mean 2010 i dont think th... (by vlad61)
Reading Data from file into 2-d array trouble
 
Hi all, I'm trying to write a program that will take tab delimited data from a text file and put it into a 2 dimensional array. I've been doing some researc...
[2 replies] Last: OK, so I now understand that the segmentation error was the result of ... (by mantale1)
by TLO
Excel does not see DLL anymore when used with GSL working function
 
Hi, I am new to C++ and request kindly help. I need to link C++ with excel, I managed to program basic DLL's with basic functions exported to Excel (+, square, ...
[no replies]
by wtf
My program executable is 128K.
 
Why is the size reported in task manager 552K?
[11 replies] Last: That's perfectly normal, it doesn't go any lower than that. Your appli... (by Athar)
Setting up code::blocks
 
I've only used dev-c++ and Visual C++ which comes with all the libraries. Does Code::Blocks not come with any libraries? And if so where do I find them and ho...
[5 replies] Last: Copy and paste the exact error message(s) you're getting. (by Athar)
Array troubles
 
I'm having some problems creating arrays, anyone know what's wrong? int check; //The while statement effects the value of check while (...) {...
[2 replies] Last: Great, your going to make me read the one section I was avoiding >_< ... (by Shay9999)
July 2011 Pages: 1... 2122232425... 54
  Archived months: [jun2011] [aug2011]

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