General C++ Programming - November 2014 (Page 23)

by Noori
MakeFile
 
Hello, Lets say that i want to use makefile in Unix, i have the following files inside (/home/make...
[6 replies] Last: Yes. Fixed above. (by Duthomhas)
What is wrong with my c++ code
 
Platform : c++, compiler: GNU gcc I am new to programming and have written the code for the follo...
[2 replies] Last: Thanks for the reply. I have change while(sum ==1) to while(sum !=1) ... (by abdcode)
Virtual function in c++
 
Hi everyone, i have an exercise using virtual function. I understand virtual function when use it wi...
[6 replies] Last: "Now, add horse (70 km/h) into that box, how the program changes?" Th... (by nightmaregiba)
Can't seem to get right array info
 
Description of how program output should look and work as follows... Enter the curve data(0 for t...
[no replies]
by juaok
Using rand() function and resetting the seed?
 
So I've actually used rand() happily without any problems so far, but now I faced a problem. I have ...
[2 replies] Last: Oh, I didn't even notice that. Yeah, I wanted to pick a number between... (by juaok)
Importing 2D array
 
Essentially what I need to do is take a text file, ("input.txt"): 4 4 1 0 0 1 1 1 1 1 0 0 1 0 ...
[1 reply] : Since the size of matrix isn't fixed you can't use static arrays. Use ... (by rich1)
i need help to add some code for matching
 
i need to be able to make matches from the data i input, and also classifying between male and femal...
[1 reply] : Look at the for loop in match() function: for(int i=1;i<=10;i++) ... (by rich1)
How can you generate and then store a random number?
 
So I have to generate a random number between 1 and 6 and then store that same random number into an...
[7 replies] Last: @MatiasMunk - Line 43: NEVER call main() recursively. It's not allowe... (by AbstractionAnon)
Difference Between circular queue and simple queue
 
Hi Everyone, is there is any body who can tell me basic difference between circular and simple queue...
[1 reply] : The difference is in the implementation. A queue is a queue, a FIFO s... (by kbw)
by PacR
Vector of pointers , am i using delete correctly here ?
 
#include <stdio.h> #include <vector> class player{ private: int id; public: void ...
[6 replies] Last: Thank you armonsafai & MiiNiPaa for your answers , also the link you ... (by PacR)
how to use data from a data file
 
I need to perform operations on data from .data file i am able to load the file but how to use the d...
[4 replies] Last: it worked, thanks for the help. and i'll keep the advice in mind for n... (by adbharad)
by XorioZ
Optimizing my code
 
Introduction: Hi and thank you in advance. My name is Mikkel and i'm somewhat new to c++. I actual...
[4 replies] Last: #include <iostream> #include <string> #include <sstream> bool is_dec... (by JLBorges)
No matching function for call to?
 
Every time I try to compile this, I get the error message, "error: no matching function for call to"...
[6 replies] Last: @ProgrammerSoul I believe you're not reading the file. It may be the ... (by whitenite1)
From While's to For's...
 
I cannot seem to switch all of these WHILE loops over to FOR loops without creating some sort of reo...
[3 replies] Last: Oh sorry I didn't not read completely . (by moufou)
linker command failed with exit code 1 problem
 
Hi Today I opened my program to double check if there was any bugs in my code and unfortunately ...
[4 replies] Last: To WildBlue and Peter 87. Yes, it was the spelling of the function. Th... (by soldier10)
Help making a shell
 
Hello so I am a bit rusty, and by that I mean like SUPER rusty. I have this program that creates a ...
[no replies]
Confusing Problem
 
So, I have no code for this yet.. I cannot even understand the question enough to know where to begi...
[3 replies] Last: First question. Do you know what the collatz conjecture is? And the ba... (by d1ff1cul1010)
Inheriting Constant Members
 
Hi everyone. I just ran into two problems with the following code. The first one is that the constan...
[1 reply] : Initialize n in A's constructor. (by Peter87)
do while loops
 
do { cout << "Height: "; cin >> height; cin.ignore(1000,'\n'); ...
[4 replies] Last: Thanks rich that worked! I had never heard of that, I was thinking tha... (by nhoffmanfr)
checking file fail
 
ofstream infile; infile.open("Input.txt"); if(infile.fail()) { cout << "Error Op...
[4 replies] Last: I had to check for a file at some point and found this lying on the ne... (by XorioZ)
November 2014 Pages: 1... 2122232425... 32
  Archived months: [oct2014] [dec2014]

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