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

bitset declaration in class
 
Hi, i've got some problems with the declaration of a bitset container in my class i've got a class A and want to have a bitset container in it, whose size j...
[1 reply] : The size of a std::bitset<> is a non-type template parameter; it mus... (by JLBorges)
Not allocating enough memory to pointer?
 
Hi, I wrote the following C++ constructor, and I get an error - BUFFER too small on strcpy_s Trace::Trace(const char *str) { if (str) { ...
[3 replies] Last: Awesome! thanks a lot!! ajh32 and modoran :) (by jared11)
by karan7
c++ string program
 
Heyy guyz I have made a c++ program of strings. I want to display in my output only those words of that string which have length greater than 2. for eg. Is t...
[13 replies] Last: Thank you so much ajh32. :) (by karan7)
by vikke
WHYYYY??
 
So I try to display temperatures from 100 down to -273 celsius. Why are this only showing from 25 to -273???? If I change to lower limit to for example -4, ev...
[6 replies] Last: TY! (by vikke)
How to Create a Timer In C++
 
#include<iostream.h> #include<time.h> #include<conio.h> void sleep(long double d) { clock_t start=clock(); while(clock() - start < d); ///loop until time'...
[3 replies] Last: He is using iostream.h, so a very outdated compiler and all the answer... (by modoran)
Understanding ways of array declaration and input
 
Hi, I want to understand the ways in which arrays can be declared and used. It would be great if anyone could tell what each of the following do or what's the ...
[2 replies] Last: Thank you very much long double main . I wasn't expecting such an ext... (by Silver Falcon)
by dogon
Logic Error- Maze not displaying
 
Hey everyone: So I have a program where I solve a maze using stacks. So my display_maze function take two parameters and displays the maze according to where...
[1 reply] : "My car won't start! Here's the exhaust pipe." We need more than you ... (by LB)
parameter pack constructor + const copy constructor not playing nicely
 
I don't know how to technically explain it...but the snip is below. Why can't rhs in the copy constructor be const? #include <array> #include <cstdlib> #in...
[4 replies] Last: I had thought of providing an initializer list, but it seemed to go ag... (by closed account 3hM2Nwbp)
Taylor series C++
 
Hey guys, First time posting in a forum, I just can't seem to get my code to work. Everything compiles and runs, but I am getting an "inf" where my answer...
[4 replies] Last: As ldm mentioned you are not even following the formula. It should be... (by giblit)
Function Help
 
New coder here, Only learned what they taught me in school. In this code, I kinda got it down, but I am having a bit trouble with my functions. I am using C++ 4...
[6 replies] Last: You made me laugh so hard, I feel so stupid. Im going to over my whole... (by MiniclipSean)
Now that CPU process data byte by byte, what's the reason to use bitwise & bitset?
 
Of the reason of manipulating bits, the only one I can think is about saving storage. But now that CPU don't even have address for each bit, AFAIK CPU have addr...
[1 reply] : You need bitwise operations because that's the only way to access bits... (by kbw)
Speeding up VGA emulation?
 
Anyone got any tips regarding speeding up VGA emulation? (I'm currently processing the pixels, one at the time, from VGA VRAM to the emulated screen. The render...
[5 replies] Last: Text mode rendering routine: inline void VGA_Sequencer_TextMode(VGA_T... (by superfury)
Array declaration problem
 
Hi, Here's my program: - // Program which inputs a string from user, reverses it and displays it. #include <iostream> using namespace std; void string...
[5 replies] Last: Thanks ajh32 and Peter87 for your kind explanation. Now I know how... (by Silver Falcon)
string implementation with tokenize function
 
I made an string class based on page 602 from C++: How to Program 6th edition (Mine is not finished yet). I'm trying to implement 2 functions, in special. One i...
[13 replies] Last: Ok. I agree, if it is a member, should return the type. But split need... (by iQChange)
by elrat
Strange linker behaviour
 
Hello! I'm encountering an issue i can't solve on my own. The problem in a nut shell: I got a class LiveReceiver with a static member method LoadLibrary (),...
[3 replies] Last: That's it! Thank you very much! :) (by elrat)
Qt tutorial:??
 
hi, sorry but i couldn't find one, the one in qt is not a tutorial just 2 apps tutorial where can i learn Qt??? i already know c++ java some other languages!
[3 replies] Last: Gladius (7) If you want qt try "VoidRealms" on youtube. He has over 1... (by kam hagh)
Stringstream object and text file data access issues!
 
Hey guys! Please I need your help. I have two puzzling issues I am dealing with. Issue 1: I am using a stringstream object in a block of my program tha...
[7 replies] Last: @keskiverto: Thx for your replies. I have finally resolved the is... (by geeloso)
Ducks and Alligators
 
I am having a problem with this program. There are N ducks swimming in a circle on a pond. An alligator is eating every Rth duck as it swims by. The ducks are...
[2 replies] Last: How do I count how many times the loop executes? and the if(ii>many... (by Sirblueshue)
a vector of void pointers which point to array of characters (1,2)
 
This code work perfectly, as follows. Code #A: #include <iostream> #include <cstring> #include <vector> using namespace std; typedef std::vector <void *> ...
[23 replies] Last: Dear all above, I think it is ok if we don't have a better idea. So t... (by activecat)
by ace799
Question
 
This is just a practice test I found online to prepare for a class that starts on the 27th. Most of the questions I can find on google but this one has stumped...
[2 replies] Last: Do you know what isdigit() does with its argument? And what it returns... (by Zhuge)
January 2014 Pages: 1... 56789... 25
  Archived months: [dec2013] [feb2014]

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