Beginners - December 2014 (Page 5)

printing hourglasses pattern
 
hey!Hello I have a question about fuction that i have trouble with. I need to get 2 numbers. K and num1. For example num1=5 and k=2 the program will print this ...
[1 reply] : anyone please? (by Elads11)
compile in cmd windows
 
hi all, im using MinGW can anyone tell me the exact step of this? i know there is a lot of good ide but i really want know this manner. thank u.
[7 replies] Last: when i tried to compile using cmd with C::B\mingw there was a blink of... (by anup30)
Error after inputting seven numbers
 
This error always occur after I input 7 numbers. What could it be? #include <iostream> #include <limits> #include <vector> void checkingInput(int &); void d...
[5 replies] Last: Alright, fixed it with vectors. Hurrah for vectors. (by deathslice)
Trouble with random number generation
 
I'm trying to make the range smaller when the computer is guessing a number. I got the higher end, but I don't know how to make the lower end range higher whe...
[1 reply] : You use a constant on line 6 to indicate the lowest number in the rang... (by cire)
Need help with random number generation
 
I need help writing a bit of code that makes something have a 5% chance of happening, and then if it doesn't happen, it needs to have a boolean variable equival...
[3 replies] Last: For percentages I usually generate a floating point number between 0-1... (by Disch)
Program to solve quadratic expression
 
Help I need with this #include<iostream> #include<cmath> #include<math.h> using namespace std; int main() { double a, b, c, x1, x2, determ...
[4 replies] Last: Please observe: http://www.parashift.com/c++-faq/floating-point-arith.... (by keskiverto)
by Lee125
void function
 
Hello guys. can you explain to me? why void function cannot be placed after main function? #include <iostream> using namespace std; const int WIDT...
[5 replies] Last: why the function prototype look like different as usuall. Can I know... (by AbstractionAnon)
comment ne pas réecrire tout le code pour un autre level?
 
salut, j ai besoin d 'aide urgent svp. j ai passé toute la nuit a chercher la solution mais je trouve rien. ce code est un level d 'un jeu. quand j 'ai essa...
[1 reply] : hi, I have need of emergency help please. I spent all night searchi... (by AbstractionAnon)
can someone explain this line for me ? :0
 
explain the line underlined plz ?:0 std::ifstream fin; fin.open("itemstore.dat",ios::binary); fin.read((char*)&amt,sizeof(amt));
[1 reply] : Did you check the reference page? http://www.cplusplus.com/reference/... (by AbstractionAnon)
by Lee125
void function versus value return function
 
What happens if the return statement is commented out? Nothing happens when i removed the return statement in void findNumber function. Can anyone expalin to ...
[2 replies] Last: Thank you Peter87. I understood now. (by Lee125)
by fx11
strstr
 
I'm reading a book about C. Here is an example program. Why doesn't strstr() find the "town" inside the tracks array? #include <stdio.h> #include <str...
[4 replies] Last: Thanks. Removed '\n', more precisely replaced '\n' to '\0', it work... (by fx11)
by Lee125
unknown file.
 
What the best program for open this file. i didnt know how the file can read. the type of file is O File (.o)
[1 reply] : Object files are produced by the compiler when a source file is compil... (by Peter87)
Help with doxygen.
 
Hello. I am trying to use this C++ reference archive(http://en.cppreference.com/w/Cppreference:Archives) with doxygen. The information under "Doxygen tag file" ...
[1 reply] : Can someone help me please (by Hashirama senju)
Parse XML in C++
 
I want to parse an XML file to a text file containing a table of the XML data using Qt or any other library in C/C++. I have seen many examples and tutorials b...
[2 replies] Last: Thanks. I but "luck" is not enough to go through xmlLite. Think ill sp... (by shadowCODE)
Help with creation of functions
 
hi i created this programm, but now i need to divide it by functions, one for creation of points, an other for center of mass, an other for rotation and an othe...
[no replies]
DrawText() does not work properly in Release build
 
Title: Release version of a 32-bit Win app fails to render text properly Background: I am running 64-bit Win 7 OS. I have been developing Win apps in MS 2...
[no replies]
Not saving input and updating. (1,2,3)
 
I'm pretty sure the problem is because I'm not referencing the input once the function terminates. I'm testing player1 input and whenever player1 inputs X or O ...
[44 replies] Last: I was thinking of something like this. pseudocode for (int i = 0; ... (by deathslice)
Problems with Object String Length
 
Write your question here. Why in some cases len is calculated using 1. len = strlen(str) + 1; 2. len = strlen(obj.p) + 1; 3. len = obj.len; 4. ...
[4 replies] Last: Similarly, for the Copy constructor, len should also be obj.len; and ... (by MiiNiPaa)
Streams & files
 
Hey there! The program below are supposed to take as an argument a few files and place them in a vector. Then creates the file and writes the text of incoming f...
[6 replies] Last: Thank u! (by igoreshka3333)
Generate by random a set of n points in 2D Cartesian Coordinates System
 
I have a problem with this code, when i try to run it the result is a lot of 0.00000. I need to generate random set of 2d points. I am new, so maybe what i wrot...
[9 replies] Last: Thank you very much guys, you are great!! (by closed account 375jz8AR)
December 2014 Pages: 1... 34567... 55
  Archived months: [nov2014] [jan2015]

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