General C++ Programming - September 2013 (Page 3)

How would I go about writing a duplicate counter?
 
delete
[2 replies] Last: delete (by ovaltine99)
Reading a struct from a file (binary)
 
Hey. I have a file in which I have written a structure called "Record". Here is the struct definition: #define IDSIZE 10 struct Record{ char id ; int score...
[1 reply] : record.id = id; //error: incompatible types in assignment of ‘char*... (by ne555)
HELP!!! arrays and loops
 
Hey guys, I need to create a table that is 14 rows by 7 columns. I need it to appear like: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0...
[1 reply] : I would suggest you make a 2-D array. By looking at your desired out... (by bingo1)
Why is my programming running forever?
 
Got it
[4 replies] Last: bool found_it = false ; for (int i = 0; i < subjectCodes.size(); i++... (by JLBorges)
by pedrox
Convert chars to utf-8 hex strings
 
Hi, mates! I am trying to convert some chars to UTF-8 strings... Example: std::string gethex(char c) { /* EXAMPLE if (c == 'é') return "%c3%a9"; ...
[14 replies] Last: > Now it works... But only when I type the string direct in the cpp fi... (by JLBorges)
Columns of Related data
 
I honestly have no idea where to start with this. Any advice would be appreciated. obviously it is supposed to be in C++ and x y and z are arrays. I know how t...
[1 reply] : For outputting the results to a file: http://www.cplusplus.com/doc/tut... (by closed account jwkNwA7f)
Finding words, phrases and sentences. Help!
 
Hey guys I need help in counting the number of words in this input (use isspace( ) to find breaks between words), the phrases, and the sentences. Can someone pl...
[2 replies] Last: oops ya your right my bad here is my code: #include <iostream> #incl... (by Totes my goat)
Help with finding higest and lowest
 
How can I properly find the lowest and the highest temperatuers? #include <iostream> #include <string> using namespace std; struct months { floa...
[1 reply] : float lowestTemp = 140; string = lowestMonth; for(int i=0; i<12; i++... (by aaron85001)
Adding Array Elements together
 
Hello, I'm having trouble getting my array to add its values together. I have a similar program running fine with the exact same equation. I am not so naive a...
[2 replies] Last: Use code tags, so I can point exactly the line for (int a=0; a<10;a++... (by ats15)
Need help
 
// Portfolio - Chapter 8 #include<iostream> using namespace std; class BankAccount { private: int acctNum; double acctBal; doubl...
[1 reply] : Okay, so Portfolio::Portfolio(//lots of variables.....) is called t... (by bingo1)
plz help me with this code
 
i have two functions here.i have declared two loops in function but i don't know how to print these loops value in another function. void houseInfo::getdata()...
[1 reply] : Well, I see that those are two separate functions, and they didn't tak... (by bingo1)
by dalal
q :class & object
 
Write a C++ statement that defines a Circle object named Circle1 with radius 5. Write a C++ statement that changes the radius of object Circle1 to 0, and w...
[1 reply] : I believe you need to create a class called Circle , and Circle w... (by bingo1)
multi-dimensional vectors
 
I've seen code examples for assigning 2 dimensional vectors, but I haven't seen code for assigning more than that. I tried to create a 3 dimensional vector, and...
[5 replies] Last: > but it seems to me that all you're doing is re-sizing that particula... (by JLBorges)
having problems with PThreads, not compiling!,, PLEASE PLEASE HELP
 
The following function seems to be the cause of the problem template <class Type> void * server_work(void * arg) { int ii; int cno; Serve...
[2 replies] Last: It flags an error on line 20 when i run it! :( now, i have corrected t... (by Ozwurld)
using 'this' in template header
 
i have 1 class: from here: http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4031/Implementing-a-Property-in-C.htm template <typename Container, typename Va...
[1 reply] : Hi there, Template parameters are not usually variables, only typenam... (by closed account o3hC5Di1)
build events like anothers languages
 
class test { private: string name=""; public: event void changedname(); void setname(string value) { name=value; ...
[12 replies] Last: hi... thanks for correct me;) that's true. and it's because it have le... (by Cambalinho)
plz help me,its urgent..i have to summit my project tomoorw
 
i wirote a program in which i declare a class called house info,i am having trouble of displaying no of house entries and things.i have declard an array name av...
[5 replies] Last: You need to declare an array of the class of size 10. houseInfo myh... (by Mats)
need critiqueing on some software
 
so i wrote a basic fibonacci program, and i was wondering if there was any way to make it better. just for the record, it works fine and exactly the way i want ...
[7 replies] Last: i would have to convert it back to an int. about b) thanks that would ... (by closed account Dy7SLyTq)
by Shren
Binary Tree Structure
 
Write your question here. typedef struct node { char value; // the character that needs to be compared in the tree node *left; // pointers to two...
[2 replies] Last: Yeah, I was having problems identifying the parent node. I dont actual... (by Shren)
Sequential search problem
 
Hello guys I'm here to seek for help to finish my program. Well the code below runs but it doesn't perform all of the tasks it should do. The program should ask...
[3 replies] Last: irrespective of whether you find the number or not you have to increme... (by kulkarnisr)
September 2013 Pages: 12345... 36
  Archived months: [aug2013] [oct2013]

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