General C++ Programming - December 2011 (Page 30)

little problem
 
can someone take a look at this code and figure out whats missing and what it takes to fix it?? my friend gave it to me and i don't get what he is trying to acc...
[3 replies] Last: and want to implement something that does this if (cin != input){ ... (by Echo773)
Delimited CSV file headache
 
So i was trying to make a program to let me read from 2 separate files, one being .csv and one being .dat and then taking information from both and combining th...
[2 replies] Last: OK Ill try this out tonight. I appreciate the help, and also that link... (by Benjamin Jeffrey)
Class
 
#include <iostream> #include <stdio.h> using namespace std; class Student { char *studname; int studnum; char gender; ...
[3 replies] Last: tnx :)) (by bmafaul)
DLL's and EXE
 
I want to know if it's possible to merge a EXE file with DLL. Or just compile the DLL source in the EXE project? I'm using SDL right now and it's already req...
[3 replies] Last: I just grabbed a copy of the SDL download (both 1.2.14-VC6 and 1.2.14-... (by mmay)
Need Help!! can someone give me a start on program
 
Prof. H is running a large class with exactly 70 students. He has prepared a text file (grades.txt, see below) that contains all the grades for the class. As th...
[1 reply] : [quote=harrisdd]can someone give me a start on program OK here: #ex... (by LB)
by beau
Issue with the rand() function
 
I'm having an issue generating random numbers using the standard rand() function, which is unfortunate because my entire project depends on random numbers. Can ...
[2 replies] Last: Well then, that was simple enough. Thanks, can't believe I didn't try ... (by beau)
C++ Question Confused
 
the program works great, but why does my A not working as I enter "a" im confused about it. #include <iostream> #include <iomanip> #include <ctime> #inc...
[1 reply] : Please wrap your code [co de]between code tags to make it easier to ... (by LB)
Trouble with arrays
 
I am supposed to use arrays to create a program that removes the lowest number and highest number. Than it needs to add the rest but I can't even get my program...
[6 replies] Last: @bwilson1: nope, no need for static_cast. The purpose of line 28 is... (by mmay)
Suggestion regarding an error
 
I have a user defined class which has a private variable x. x is a vector of a user defined struct. In the constructor of the class i am executing a statement l...
[4 replies] Last: Yes Peter u were right that this code is not compilable. The actual co... (by anunay144)
Need help making Merge Sort run faster.
 
Hi, I have written a merge sort algorithm that used vectors how ever it runs rather slowly. I believe it has to do with the fact I'm creating two vectors everyt...
[15 replies] Last: Thanks all for your suggestions I was able to get the runetime from ab... (by mfswimmer)
exceptions problem just dont understand
 
The real problem is i just don't understand exceptions at all. Here is what I got it is a stack program. /** * Passes the top tag from the stack * ...
[8 replies] Last: All working good now Source code is avalible upon request (by LiverEatnJohnson)
by accboy
Need help with Ski Race problem
 
I don't get how to start. I just need a starting point and then i can get the rest maybe a hint on where to start I don't want people to do the coding for me I ...
[no replies]
implementation of >> operator in class
 
I'm solving an exercise in which I have to implement a string queue using classes. I have the classes StringQueue, that is the actual queue, and QueueElement. T...
[2 replies] Last: Great, works perfectly, thanks a lot! (by CryptKeeper)
wanna correct this,, simple
 
#include <cstdlib> #include <iostream> #include <string> #include "windows.h" using namespace std; int main() { cout << ">"; string greeting1 ="Hey";...
[5 replies] Last: Just convert the user input to all upper/lower case and then check it ... (by ModShop)
Get CURL result as a string
 
Hello I am getting the content of a web page with curlib, into a variable called res of CURLcode type. How can I convert that variable into a string so I can u...
[1 reply] : I think you can just call curl_easy_strerror() so something like this:... (by Texan40)
static_cast and typeid
 
Is there a way to pass a typeid return directly to a cast (with some clunky if else if block)? Something similar to the following is what I'm wondering about (...
[10 replies] Last: Thank you everyone for the help! (by whitmcrae)
by Zapeth
wrote to memory after end of heap buffer error
 
Hi, I realize that such a problem has already been discussed many times out there as I have found many threads with such a title but even after looking into 10 ...
[11 replies] Last: Why don't you just use a std::stringstream ? Then you don't have to wo... (by modoran)
Error overloading operator
 
I am getting this error "<< operator function should take two parameters" I wanted to overload << operator so as to work like "cout<<s;" where s is a string obj...
[3 replies] Last: Use <iostream> and not <iostream.h> Don't use <conio.h> Use <string>... (by LB)
Help please
 
#include <iostream> using namespace std; char moveto; void z() { cout<<"You are now standing on z. Were do you want to move?\n"; cout<<" ...
[3 replies] Last: Do not ever call main()! Use a looping structure like do-while.... (by LB)
Reading from a file...
 
in the else if, compiler gives an error saying "undeclared identifier" HELP plz...! void studentrecord() { char sub; cout<<"\n\nChoose from one of the ...
[6 replies] Last: What does "does not open" mean? Are you sure the else part is executed... (by hamsterman)
December 2011 Pages: 1... 2829303132... 39
  Archived months: [nov2011] [jan2012]

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