General C++ Programming - April 2012 (Page 5)

Mysteries of the cin buffer (or int)?
 
I have a problem with my code, its supposed to be the beggining of an Invoice calculator, it runs fine as long as you answer the first question with a whole num...
[5 replies] Last: if(toupper(pClean ) == 'Y') (by Disch)
Looking for a good FreeGlut tutorial
 
I'm pretty sure that the title says it all. I use Dev C++ as a compiler, if it makes a difference.
[1 reply] : http://www.videotutorialsrock.com/ From now on, this man is your God. (by NGen)
C++ Gui & Execute
 
Okay, listen up, cause I need a lot of help here: I want to make a C++ Gui that executes a program (In this case Windows defender) I have the Gui code: ...
[5 replies] Last: It is not enough to say it comes up with an error. You MUST show the ... (by webJose)
matrix declaration
 
I am going through some code and I see the following: std::vector<std::vector<double> > x; does that mean x is a matrix?
[4 replies] Last: understood...thanks! (by itcplpl)
by BotHH
Threading and loops
 
Hi, I'm trying to get my threads to run at the same time but I need for them to display different values and delay for different periods of time. I've tried loo...
[3 replies] Last: //... HANDLE hThread ; for(i = 0; i < MAX_THREAD_COUNT; ++i) { Th... (by clanmjc)
How to convert a string to int
 
I am saving an int to a text file and reading it back but I am unable to reuse that int saved in file as an integer. Please help.
[2 replies] Last: Stream operations allow reading into integers just as with any other b... (by Bazzy)
by roarkr
modify numbers in text lines in one file based info from another file
 
hi, i have a file a.txt  with around 500 lines of text. some of the text lines have som user specific numbers that need to be replaced , example of line ...
[no replies]
Finding prime numbers, elegantly
 
So a friend of mine and I are students trying to find prime numbers as fast as possible, using as little memory as possible. We want to find a prime number with...
[3 replies] Last: You should use the Sieve of Eratosthenes. Use one bit per uneven numbe... (by Athar)
Generics Linked List
 
Hi lads, nice to meet you all, I have a question regarding generics in C++. I come from a Java background and I have to learn C++ for a new job and I'm progress...
[5 replies] Last: Appreciated man :) (by masterofpuppets690)
1-dimensional (2-byte unsigned short) array
 
OK. I am working with data from a third party software. This company's software generates charts on demand. When asked how we could replicate them they replied:...
[no replies]
Recursion help
 
From this Towers of Hanoi c code, I noticed it doesn't return anything and I learnt that recursion works by storing its local variables, arguments and each func...
[no replies]
Cannot find #include file
 
I am trying to download an HTML file from the web using the cURL lib. I downloaded cURL windows 7 64bit.exe file and installed it in C:\windows\system32 as per ...
[1 reply] : Try using its complete path ie. something like this #include "C:\Us... (by masterofpuppets690)
If some one could look at this code and tell me where im going wrong
 
This is the error i get Unable to start program D:\c++\object\Debug\object.exe The system canot find the file specified. object is the name of the projec...
[3 replies] Last: there has to be some modication i am only doing for the char variable ... (by bluecoder)
2 dimensional dynamic array
 
I was tasked to make a student class for my project. i was supposed to take input from the user and show the resultant output using dynamic arrays. Then i need ...
[no replies]
by mowicz
conversion from string to char* (1,2)
 
Hi there. I am making my own pseudo string class and I need an overloaded operator for converting string into char*. Dont wanna use cstring /c_str() function. ...
[39 replies] Last: std::string wasn't strictly COW before C++11 in the first place, it wa... (by Cubbi)
Unit test : use of a tool or "manually".
 
Hi, I would like to know if for your unit test you use tools such as cpp unit or just a 'manual' unit using main functions. Thanks in advance for your hel...
[2 replies] Last: Thanks. (by MoonDragon)
by Malcom
Need help on this Thank you
 
#include<iostream> // required for cin , cout #include<cmath> // required for sqrt() using namespace std; int main() { const int size=56; double R ={45.3, 67...
[13 replies] Last: @ne555: My brain malfunctioned :/ (by Peter87)
3.6.3 Termination - statically
 
Help me understand this... see bold. 2 If a function contains a block-scope object of static or thread storage duration that has been destroyed and the functio...
[1 reply] : I think your understanding is correct. (by Peter87)
by RiHdz1
Need Help/Conditional Operator.
 
Q: Write a proogram that asks the user to enter 2 numbers. The program should use the CONDITIONAL OPERATOR to determine which number is the smaller and which is...
[4 replies] Last: or cout << (a==b?"equal":(a>b)?"a is greater":"b is greater"); ... (by Pravesh Koirala)
Constructor help (simple).
 
Hello, I am writing a beam analysis program, and I need to use a constructor method defining the + sign as increasing the length L of the beam by the amount ...
[2 replies] Last: Duplicate: http://www.cplusplus.com/forum/beginner/69577/ Wazzak ... (by closed account zb0S216C)
April 2012 Pages: 1... 34567... 49
  Archived months: [mar2012] [may2012]

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