General C++ Programming - May 2011 (Page 27)

Loops and arrays
 
Basically what I am trying to do, is read in from a text file character by character, and count the frequency of each alphabetic character. then output the resu...
[14 replies] Last: its not perfect, but it does the job, later on after a little more lea... (by joshvalentine89)
Need help with this simple code
 
Here is my code, please fix it if you can. The output doesn't do anything. It just displays what was entered. #include <iostream> #include <string> #incl...
[5 replies] Last: You got all answers in thread that you took code from http://www.cplus... (by savavampir)
classes and inheritance
 
I'm still new at using C++ and I'm having a problem with understanding classes and inheritance. Specifically, how a derived class can access the members of a p...
[7 replies] Last: I understand that when a class is private only the class is allowed t... (by kbw)
by fly89
Delete line from file
 
This function deletes the word the user types, however I can't get it to delete the whole line. The text file is using XML passers like so: <vehicle><reg>OT8...
[no replies]
undeclared identifier problem
 
I've been trying to create a program that's like that old video game 'Zork', where you can move from room to room just typing n, s, e, w. The one I'm making tak...
[2 replies] Last: FYI, a Zork project is perfect for a data-driven paradigm. Essentiall... (by kfmfe04)
expected ‘,’ or ‘...’ before ‘protected’ compile error!
 
Hello guys, :-) I’m creating an OpenGL simulation for my simulation program. I included the header files from my simulation in my Qt program. I got this er...
[3 replies] Last: I got the problem. The word "signals" is reserved in Qt. that's just... (by kfmfe04)
defining integers of arbitrary length?
 
Hi, all - I need to simulate some 62-bit circuitry. I seem to remember reading somewhere about a C++ facility that lets me define integers of my own length, ...
[8 replies] Last: int64_t is (now) a standard C type. These constants are defined in st... (by kbw)
Convert Linked Queue to Circular Linked Queue
 
I am trying to learn C++ and I having some difficulty with this task. I need to take this code and convert it from a liked queue to a circular linked queue. Any...
[2 replies] Last: @netexhorn please make an effort to think it through - conceptually,... (by kfmfe04)
if/else statements!
 
#include <iostream> #include <cstdlib> using namespace std; int main() { int a, b, c, d, e, f, g, h, i, j, k, l, m, n; cout << "Hunterbucks Menu:\n"; ...
[2 replies] Last: Hi chimysta32, 1) Please ask direct questions. "Please help" is not ... (by PanGalactic)
static vs. enum
 
in regards to ML380's post in thread... http://cplusplus.com/forum/general/42144/ template <typename Type> struct TObjectSizeCalculator { enum {size ...
[3 replies] Last: That is very interesting, I did not know, before this, that an enum co... (by closed account zwA4jE8b)
displaying vector full of objects
 
I am trying to make my program print out the contents of a vector containing objects of class type Checking i want it to print the balance of each element in t...
[1 reply] : cout<<checking is outputting the address of the class object at 1. ... (by closed account zwA4jE8b)
Need help with this question
 
Write a C++ program that converts Fahrenheit to Celsius temperature in increments of 5 degrees. The initial value of Fahrenheit temperature and the total conver...
[3 replies] Last: Agree with above. The forum is not a homework camp. (by b2ee)
Trying to format nice columns via cout
 
How can I make my app format nicely format columns. See program below. #include <iostream> #include <iomanip> const double minFee = 2.00; const double ...
[1 reply] : I have an idea. Store what you want to "cout" into a string. That way,... (by ModShop)
Pointer problems; cvCvtSeqToArray throws Null Pointer
 
Hi there, I have been having a problem with cvCvtSeqToArray - I expect it is something to do with my pointers and not freeing memory correctly, but I haven't ...
[1 reply] : I believe this is a problem with pointers, which I'm a bit rusty on, s... (by binksy89)
Load values into an array
 
How would I load these 10 values into an array that can later be searched? I think I'm missing something simple. 19 for (int x = 0; x < 10; x++) //A...
[7 replies] Last: hint: Maybe you could use a counter that increments every time a numbe... (by aquamongoose)
Help me with 1 Job
 
Need help with 1 job, couse i'm begginer. Please help me , couse i write in alot forums and nobady knows c++ to help me with it. Here is what i need : He...
[12 replies] Last: sure the coder is : pegasus128 you can find him here and this is his w... (by diablo21)
by HenriK
Trouble with SFML - Working with sf::Clock
 
Hi, I just started using SFML by several recommendations and decided to put up a little program. It is based on the OpenGL example I found from the official SFM...
[1 reply] : Post the code. Try reproducing the same error in as little code as you... (by hamsterman)
by sridu
Help needed within 2hrs plz!!
 
I need to1) write a library management program using structures or2) write a single program using strcpy(s2,s1)strcat(s1,s2),strcmp(s1,s2),strcmpi(s1,s2),strle...
[2 replies] Last: did you achieve that in two hours???? sorry bro no code sharing (by mahinkhan22)
memory functions
 
I have been working with memory functions and I believe the reason a char* is used is because it is one byte in size. Is that correct? Also, because char* i...
[7 replies] Last: @helios I thought that was how it needed to be setup. But now that y... (by closed account zwA4jE8b)
improved compilation
 
I'm trying to come with a way to allow the default construction of a class, but throw an error if the user tries to access a member of the class without fully i...
[12 replies] Last: here's a crazy idea. What about overloading the . operator or -> oper... (by ischuldt)
May 2011 Pages: 1... 2526272829... 32
  Archived months: [apr2011] [jun2011]

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