Beginners - June 2016 (Page 4)

What does char bigstr[1000] = "" do?
 
#pragma warning(disable:4996, 4013) #include <stdio.h> #include <string.h> int main(void) { char bigstr = "", str ; for (; ; ) { printf("En...
[3 replies] Last: This one runs on cpp.sh #include<iostream> using namespace std; i... (by shadder)
need help in my c++ project immediately
 
vector <struct> inside vector<vector> which i cant access because vector <struct> take the value by reference i want someone to access the course id in stu...
[no replies]
by Shadyx
Multiple .cpp files problem
 
Hello, using code::blocks I created a project called exercise for practice purpose. But working on a .cpp files different from the first one created give error ...
[2 replies] Last: I haven't use Code::blocks for a while but IIRC it is essentially the ... (by closed account 48T7M4Gy)
error & keep_window_open, WHAT classes?
 
I am with PPP using C++ book by Bjarne Stroustrup Currently finishing touches to the calculator.cpp between theme 6 & 7 ## a final WORKING version o...
[1 reply] : Extracted from http://www.stroustrup.com/Programming/PPP2code/std_lib_... (by JLBorges)
Summation and Averaging Problem - Separate Files
 
I have been wracking my brain over this for hours and I know it has to be something incredibly simple that I'm missing. My assignment is to write a program that...
[5 replies] Last: Thank you, everyone for your help! Arslan7041, I made the changes you ... (by bakersha)
Help with a program
 
So I am beginning to learn and learnt a bit. Now just as practice, trying to create a simple game where one monster attacks another, well, that's too big aim, r...
[3 replies] Last: learning is good. doing is better. seeking is good. knowing is better... (by closed account 48bpfSEw)
comparing variable name and string value
 
Hi all, I checked out a bit of posts similar to this one but none were quite what I am trying to do. I think the answer is that I cannot do it this way but if ...
[4 replies] Last: jkjacks You could also use a switch statement with cases 1, 2 & 3 e... (by closed account 48T7M4Gy)
Lottery Application
 
Hi, There is something wrong with my last for loop. I don't want the program to repeat "sorry, not a winner" and it keeps printing "1" as my matching number. ...
[3 replies] Last: Look at what the variable match actually is. What is it? I don't kno... (by closed account Sw07fSEw)
Question on shared_ptr...
 
I just spent the past few hours reading about smart pointers and I'm trying to implement them into some of my projects to replace regular old pointers. In o...
[1 reply] : Use a custom do-nothing deleter. Player player ; std::vector< std::s... (by JLBorges)
university proyect
 
I have a proyect for saturday, the exercise is about a menu with 5 options. the option number 1 concist in making an square of asterisks with a number that the...
[7 replies] Last: if (int n; fila = 1 && columna = 1) if the first line and the first c... (by dcastro)
by FBHSIE
Not understanding these two things
 
I was looking at my professor's notes and came across two things I didn't quite understand. Would someone either reword or work through them with me? I'm not qu...
[3 replies] Last: Alright, we can address my repeat here, ha. (by FBHSIE)
by FBHSIE
If Bug
 
I don't quite understand what my professor is saying here and I was hoping someone would help me break it down. I know this isn't Java, but still, I figured you...
[2 replies] Last: Sorry for the repeat. I was unaware I made another thread. (by FBHSIE)
by FBHSIE
Homework feedback
 
Alright, so these were the apparent mistakes I made in my assignment. // -1 correctly formed conditional(s) - MISSING -1 WRONG ANSWER – LOOK AT THE EXAMPLE...
[4 replies] Last: http://prntscr.com/bl2s1y I'm not sure what exactly I missed or why I... (by FBHSIE)
which one is best book to learn c++
 
which is the best book to learn c++
[11 replies] Last: C++ Without Fear. If you're a total noob, this is the easiest book fo... (by volTron)
Calculating GCF and LCM easy way
 
An easy program for Calculating GCF(Greatest Common Factor) and LCM(Least Common Factor) # include <iostream> # include <string > using namespace std; int...
[no replies]
Help with 1 part of my code
 
My code works except it's behaving differently than I'd like. the Auth() part of my code has a weird behavior. Also, when I enter user credentials, it says "Pic...
[2 replies] Last: When you enter the password and press return in Auth() , the program ... (by dhayden)
Function returning incorrect value
 
Hi guys, I'm new to C++ and have come across a problem that has me stumped. It's obviously something I'm doing wrong but for the life of me I can't figure out ...
[7 replies] Last: Yeah the hex really threw me as well - I guess that should have been m... (by sunjinsak)
Expected # of flips to get 10 heads in a row? (1,2)
 
So I wrote a program which gives you the expected number of coin flips needed to get 10 consecutive heads. Apparently the answer is 2046, but my program gives m...
[21 replies] Last: bool rand_bool() { static std::mt19937 twister( std::time(nullptr... (by JLBorges)
by Jiw0on
Booleans (!cin and op!)?
 
Greetings! I had trouble understanding what exactly (!cin) and (op!='x') signify in this code. From my understanding, it is some sort of boolean, but in the co...
[4 replies] Last: welcome :) (by shadder)
Help with most frequent least frequent letter.
 
Hi guys so I am writing a program that reads text from a file, then determines which alphabetic character occurs most frequently and which appears least frequen...
[14 replies] Last: So where is your revised code? (by closed account 48T7M4Gy)
June 2016 Pages: 123456... 25
  Archived months: [may2016] [jul2016]

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