Beginners - June 2014 (Page 7)

Need Help - Same Prime Number Question.
 
Hello. I am taking a beginning C++ class and the teacher is terrible (really. I'm not just saying that.) He wants us to write programs based on material we have...
[4 replies] Last: Thank you all! It's working:) (by CMonkey)
by kuniv
Question
 
Instead of defining class and object, it may be easier to use many variables and functions. Then, why do we have to bother with classes and objects?
[2 replies] Last: Thank you. (by kuniv)
by Avto
C++ Classes Example Error :(
 
Hello Everybody I`m The Beginner of this Site and I know absolutely Nothing in C++ Classes... My friend asked me to correct this example of C++ code: // /...
[2 replies] Last: Sorry I wrote it as a mistake: moswavle = student sorry (by Avto)
no exe file after compile
 
Well hi, I have a problem here. I have an assigment to write a program and use stdio.h, but when I compiled it using g++ I can't find the exe file. I tried to ...
[4 replies] Last: What command did you input to the console? An example: g++ main.cpp ... (by closed account j3Rz8vqX)
Assembly linking
 
Hi, 1)I have a superficial knowledge of c/c++ and I want to link my c++ code with assembly. How can I do that in Dev-cpp? 2)I also want to write inline assem...
[2 replies] Last: I have 32 bit OS. (by Sametbey)
How To Delay a Text for a period of time in the console before I Use system("cls") Function ?
 
In Fact i'm making a console Game .. and i want to make an Opening screen to the game which will delay a few seconds then the game will start , how to make some...
[2 replies] Last: Thanks :)) (by abdohelal)
by ntran
Editing a text file
 
Hi everyone, I want to edit a text file, but i'm stuck in finding the correct functions or methods to do so. So far I'm able to open a text file and look for a...
[2 replies] Last: Thank you very much for your contribution, there are some functions wh... (by ntran)
Simple Explanation Please
 
So basically i want to know: const std::string greeting = "Hello, " + name + "!"; const std::string spaces(greeting.size(), ' '); in this code why is s...
[3 replies] Last: Thx so got muddled up cus they used = as well as () thx so much (by Mizfizz)
range-based for loop with a iterator of reference type
 
Hi, everyone. I just encountered a range-based for loop whose iterator is reference type, which confused me a lot. The code is like this. Let's assume that we h...
[5 replies] Last: Okay, thanks a lot! (by glenjoker)
guys pls help me with this calendar
 
#include <iostream> #include <iomanip> #include <stdlib.h> #include <ctype.h> #include <time.h> #include <ctime> using namespace std; int getYear(); ...
[9 replies] Last: You're not answering Chervil 's question. Line 55: cout << "\... (by AbstractionAnon)
Strings
 
I need help on another program. I need to read a list of strings until the word "end" appears and then print the longest string/word. Here's what I've got so fa...
[6 replies] Last: Do not update maxlength too when you found new max string. (by MiiNiPaa)
VS C++ 2010 LNK1123: failure during conversion to COFF
 
I am working on project and have this error how do I fix it ? Someone suggested removing this #include "stdafx.h" ,but this creates more issues // pr...
[7 replies] Last: I created a Win32 console application ,what was I suppose to create ... (by Codermik)
Arrays 1
 
hi the teacher has asked us to embed the code in the algorithm he wrote... im not really sure what im doing but here it is...what should i do different?.. thank...
[3 replies] Last: Judging by the incorrect capitalisation of keywords such as Const an... (by Chervil)
appendinag a file
 
hi, I was writing a function in c++(with file handling) that takes the name of a file and another file on the same directory and copys the contents of the 2nd ...
[18 replies] Last: ok thanks for the info MiiNiPaa (by cyberdude)
Arrays 2
 
hi this is the second question I have...the teacher has asked us to embed the code in the algorithm he wrote... im not really sure what im doing but here it is....
[1 reply] : Refer to my other post here: http://www.cplusplus.com/forum/beginner/... (by Codermik)
Loop yes or no
 
How can i put a loop? "Want to buy something else? Yes/No" If Yes: start again from cout<<"Producto:"; if no: print a bill. Thank you for your help. #inc...
[1 reply] : Find the start and end of the certain procedure you wish to encapsulat... (by closed account j3Rz8vqX)
anyone , help.
 
7.37 (Find the Minimum Value in an Array) Write a recursive function recursiveMinimum that takes an integer array, a starting subscript and an ending subscript ...
[19 replies] Last: everything is working I'm not so sure about that. You had a chanc... (by keskiverto)
by bd08
find min, max, median and mode from a file that contains 40 numbers
 
Hello everyone, I have trouble doing this homework. I'm supposed to read a file that contains 40 numbers as scores and then find its highest, lowest, average...
[3 replies] Last: In calcAverage() , sum in uninitialized. Set it to zero before ent... (by dhayden)
by Nezar
Tell me why
 
Hi, I have a question about the line marked with a comment in the code below. why did author use stringstream() instead of cin ? source: tutorial--...
[1 reply] : The method used consumes the entire line that the user enters, includi... (by dhayden)
Help with a function
 
This game is mostly working but I think I have an issue with my checkwinner function, it is returning true way too early. Any insight is appreciated! /* ...
[6 replies] Last: line 119 - case 'T' - if no one's won the game yet, don't you want to ... (by wildblue)
June 2014 Pages: 1... 56789... 48
  Archived months: [may2014] [jul2014]

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