Beginners - October 2014 (Page 52)

for and bool function problem
 
I havn't touched code for a while now and dont know why "Success! (num)" dont print. Shouldn't "Success! 6 print? bool check_size(const string &s, string:...
[2 replies] Last: Oh that is what I forgot, thank you. Can`t believe I forgot that :/. T... (by closed account EwCjE3v7)
output formatting
 
how do i use the setw if I want following output where first and last names are of different lengths for students. The name formatting has to be strictly left ...
[6 replies] Last: setw() applies to next output. Logical choice if you need to set width... (by MiiNiPaa)
function not working
 
Hello, here is my code, I am doing a morse code translator. The probloem is that I am trying to get a line from the user but the program runs without inputting ...
[3 replies] Last: All I know is don't mix cin>> and getline(), I think that getline is t... (by LendraDwi)
Help?
 
Write a progam that reads a string and outputs the number of times each lowercase vowel appears in it. Your program must contain a function with one of its pa...
[6 replies] Last: You still have exactly the same problems I pointed out before. Lin... (by AbstractionAnon)
Best way to store a deck of cards? (Array, Vector or something else?)
 
I decided to make a Black Jack program to relearn programming/c++. I've gotten as far as making to user choose amount of decks and generating the cards. Init...
[6 replies] Last: Thanks for your help guys! My deck is now residing inside a struct! (by HiCalSoft)
Error in Cout statement
 
I'm getting an error in my second cout line and cant figure our what I'm doing wrong. I thought I declared it right but i'm getting this as my error 23 F:\Leap...
[3 replies] Last: Line 16: That's not the correct syntax for a switch statement. No... (by AbstractionAnon)
download/use random.h
 
Hi, I need different random number generators and some functions to generate random distributions. I found that random.h could do the job but I can't find ...
[2 replies] Last: Thanks for the answer and the comment. (by Genitruc)
by xello
too many initializers in character array
 
I've googled 'too many initializers' and the only problem people seem to have with this is where they have not made their array large enough to hold all the ele...
[3 replies] Last: Thanks for the quick response! both solutions work. (by xello)
Clarification about this
 
Say if i have a function like: void SceneNode::attachChild(Ptr child) {      child->mParent = this;      mChildren.push_back(std::move(child...
[3 replies] Last: I do not see recursion in your code, and it looks like sensible code: ... (by MiiNiPaa)
Little practice work from class, Confused
 
You have been hired by Home Loans Made Easy Bank, which services Mecklenburg and Cabarrus counties. Your first programming task is to create a program to determ...
[7 replies] Last: The ceil works but I just dont understand what it does to the thing. ... (by AbstractionAnon)
How to implement Tidy HTML?
 
Hi, since yesterday I have been searching the web on how to get the "tidy html for C++" package running but still no success in sight. I use VS 12 on Win 8....
[2 replies] Last: Awesome, I guess it's working now :) :) Thanks a lot! The first time I... (by Laurentius89)
Substitute an alphabetical char with another
 
I have to modify a string by replacing the alphabetical letter by a given integer of letters. For example, abcde with mod_int (modifying integer) 1 would be bcd...
[no replies]
by jdmic
Dereferencing string pointers
 
First post !!! Hi, I'm new to c++ but not in the programming world so I put my question in the beginners forum as a guess. My question is about a piece...
[9 replies] Last: ( p - lpData ) * sizeof(*lpData) When substracting last+1 and firs... (by jdmic)
craps game please help me
 
Write your question here. create a craps game 3 files ( main cpp. dice.cpp dice.h files) You will need to create a Dice or Die class to play. Use "rand() % 6...
[13 replies] Last: The instructions are your program! Just take each part of the instruct... (by PCrumley48)
argument type reference vs pointer
 
Hi again, I'm a little confused about the following: I have an event (Qt Signal/Slot concept) that returns a type "const object &", what means it returns a ...
[2 replies] Last: Ok, sounds logical.. thanks (by Binary91)
Calling constructor of parent class by calling constructor
 
Hi, I've got a question about constructors and calling their parent constructors by the way: Example: class parent { public: parent(); pa...
[3 replies] Last: Oh, thank you guys, I think I misunderstood something in my book... S... (by Binary91)
by Ikana
set precision struggles.
 
I seem to be having some issues using set precision, fixed and a few other manipulators to fix my output with three decimal places as well as a decimal point sh...
[1 reply] : What exactly your problem is? std::cout << std::fixed << std::setprec... (by MiiNiPaa)
CryptUnprotectData keep failing with error n 13
 
i've this function: std::string Database::Decrypt(std::string line) { DATA_BLOB ClearText; ZeroMemory(&ClearText,sizeof(ClearText)); DATA_BLOB Encrypte...
[7 replies] Last: Well, the decryption fails if a single byte is wrong. So I'm surprised... (by coder777)
What am i doing wrong?
 
I'm supposed to write a program that inputs various student id numbers from a file, then takes the average of all their quiz scores and outputs their id numbers...
[7 replies] Last: Because you are still reading them from binary file. (by MiiNiPaa)
C printf
 
I am having an issue understanding why the %x is not working in this code. Since int_ptr is a pointer it has a hex address in the memory so writing %x should wo...
[8 replies] Last: just checked dos c++ lang. %p is in there too for pointers. (by closed account 1CfG1hU5)
October 2014 Pages: 1... 5051525354... 70
  Archived months: [sep2014] [nov2014]

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