Beginners - May 2014 (Page 25)

Does Not Compute
 
I have to build a calculator that includes a while loop. Please help me out. // Include the iostream library #include <iostream> //Use the standard namespa...
[5 replies] Last: do a boolean check, i.e. in the menu have an option to quit the calcu... (by Codermik)
Urgent Help with Encryption Program !
 
Hi , I am a student , I have an assignment due in Computer Science , I have to create a simple encryption program. The main.cpp has to include a function.h f...
[3 replies] Last: Nah, dont :) - all part of learning. (by Codermik)
by rayna
need urgent help with file outputs
 
I am trying to read in information from a file to a different file. The file just contains numbers. the first number is just an single integer and it tells how ...
[no replies]
vector a deque or a list?
 
This is an exercise from C++ Primer that I was not sure about: "Which is the most appropriate - a vector, a deque or a list. Explain the rationale for your c...
[3 replies] Last: Ok thanks.. but I found out that a vector does not necessarily have to... (by closed account z0My6Up4)
stdin to array
 
I need to read numbers from stdin into int array. I am testing this with my program and it's not working. The array doesn't seem to have all the numbers in it....
[3 replies] Last: tabela is a pointer. Size of tabela will always be 4 (32 bit enviromen... (by MiiNiPaa)
Allocating Multidimensional Arrays
 
Hello all! I've been reading 'Jumping into C++' by Alex Allain. Great book, easy to understand, and the practice problems really help reinforce what I've learn...
[2 replies] Last: Thanks for your help! Suddenly something clicked about the data types ... (by horrificmonster)
Exception handling
 
Is my code good? Of course, the example is trivial and stupid.. Suggestions to improve it? Thank you in advance! //example2: class that defines the typ...
[7 replies] Last: So I sould use the try/catch construct in the main, for example? The... (by Computergeek01)
Sdl_displayformatalpha
 
I've set up a hardware surface in SDL and designated it as 32 bit. I've then gone through in photoshop to explicitly make every image I'm using 32 bit, and hav...
[4 replies] Last: So I've begun applying the DisplayFormatAlpha function. Even when all... (by VirtuaSinner)
bit twiddling and arbatrary length integers
 
I was trying to write some preprocessor definitions to handle some useful bitwise operations. They almost worked. #define setField(a,b) (a = 0x00 << ( b ) ...
[2 replies] Last: std::bitset http://en.cppreference.com/w/cpp/utility/bitset (by cire)
by dirmp
Question with error in Visual Studio
 
Good evening, I'm doing an exercise in C. The result is correct, but I get the following error in Visual Studio:. "Run-Time Check Failure # 2 - Stack around the...
[3 replies] Last: I made the correction and stood as the code below, right? No. You ... (by cire)
What is meant by the 'usleep'
 
int main() { int i=0; int count =0; cout<<"Please Input Speed Of Timer (ms):"; cin>>second; for(;;) { for(i=0;i<second;i++) {usleep(100*100);} printf(...
[4 replies] Last: Try it at the terminal. (by Duthomhas)
Help With Program
 
I need to print the string typed in by user off of keyboard, and take that string and reverse it(for example: "today is wednesday" to "wednesday is today"),...
[1 reply] : please resubmit your code using " " (by Parasin)
by magyar
Please help with Grocery Shopping example !
 
Hello, Please help with this online grocery shopping program! The program is only reading and displaying the first grocery item, instead of all 10 grocery i...
[1 reply] : after the user responds that they would like to continue purchasing i... (by wildblue)
Classes - initializers
 
Why this gives me an error? class Foo { const int x; public: Foo( int limit ) : x( limit ) { } }; class Bar { Foo f1(300);//error: 3...
[4 replies] Last: Yes, that's what I did ;) (by closed account jvqpDjzh)
file handling
 
#include<stdio.h> #include<conio.h> #include<string.h> #include<iostream> int main() { char findname ,pnum ,fname ,lname ; FILE *fp; fp=fopen(...
[3 replies] Last: @MikeyBoy (by lopperman)
by Echyon
Cout not printing inside loops
 
Hi everyone, I've noticed on several occasions that for some reason, "cout" doesn't print its output on the screen until it encounters "endl". This is very u...
[2 replies] Last: Great! That did the trick, thanks! (by Echyon)
help fork()
 
I have some problems with my code about fork(), sleep() and wait(). Is there a way for me to contact someone on the page private. I don't want that my code is p...
[2 replies] Last: Well I am having problem with printing process tree with pstree. It se... (by theanswer)
Is it ok to mark all pure virtual methods as private
 
I have recently noticed that pure virtual methods marked private: in a base class seem to work fine in the derived class. I would have thought they needed to ...
[3 replies] Last: Thankyou both. @Peter87 Wow it amazes me that you are always answer... (by CodeGoggles)
messing around with if statements, a couple questions
 
C++ is my first language and I'm just experimenting here with if statements. I'm trying to write a program that calculates taxes based on the first income tax l...
[3 replies] Last: Regarding the error message "Run-Time Check Failure #3 - The variable ... (by Chervil)
Invert (Reverse) Array function not working
 
Hey, friends, thanks for your time. Below is my code. It is intended for practice and learn about loops and arrays so i cant use "reverse" as you would suggest....
[3 replies] Last: Your welcome :) (by Codermik)
May 2014 Pages: 1... 2324252627... 55
  Archived months: [apr2014] [jun2014]

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