General C++ Programming - April 2011 (Page 4)

by aatwo
Extending fprintf() with variable arguments causes crash
 
Hey guys. I through I had managed to successfully create a function that was able to extend the functionality of fprintf() but I can't figure out why it keeps c...
[13 replies] Last: Sure :) Note that the code in setStatus was not written by me! It is p... (by aatwo)
getline not working properly
 
So, I'm trying to do something simple: get a line into a string, and I have this: getline (ins, temp); But, it never seems to stop, in that I hit enter as m...
[19 replies] Last: *sigh* That's because cout is buffered. Flush the output with cout <<... (by ne555)
need helps to solve this question!! (C++)
 
Write a C++ program that calculates (with at least 10 significant digits) 1/(1 ×23) + 1/(22×33) + 1/(32×43) + ... + 1/(982×993) +1/(992×1003)
[1 reply] : you also need helps with your grammars (by quirkyusername)
using union of vectors and arrays
 
Hi - I'm trying to decide whether to create a union for convenience. A class I have contains several instances of an object, some of which are in vectors. It...
[2 replies] Last: I'll need two "for" loops and two individual calls (I think). If I co... (by kbw)
Cppunit testing of classes
 
I am an intern in Hp Global software pvt ltd.My job out here is to test native cpp modules.I have encountered a serious problem.my code doesnt have any error bu...
[3 replies] Last: while running in the debugging executable its running fine but while d... (by mimoenc)
Calculate Total
 
n/a
[3 replies] Last: The comment from abellia confused you somewhat, huh? ;) Nono it's pef... (by coder777)
by HenriK
Using -keyword
 
Hi, it´s me again and I have a question about using -keyword and here it is: Is there any different functionality with this keyword than this: using namesp...
[6 replies] Last: OK, so you can use using -keyword with - classes - namespaces - stru... (by HenriK)
File get corrupted when > 2GB
 
Hi I have a TCP socket service application running on NTFS Windows 2003 system. It was running fine for a year and suddenly it started showing me corrupted l...
[1 reply] : This is a broad description of the problem. I suggest, you debug the ... (by writetonsharma)
Please help, Heap corruption error recieved
 
Hi guys, I am trying to implement decorater design pattern. But I found my program has memory leak. so I modified it but now It has stopped working. please c...
[4 replies] Last: hey thanks buddy, I tried removing line 53/84, but it gave me memory ... (by pkapoor)
What does '\n' have to do here for(i=0;i<'\n';i++) ?
 
I was going through some C code and this bit caught my eye and was wondering what is the '\n' bit about, as far as I know \n means new line, but i<'\n' ? ...
[4 replies] Last: '\n' has an ASCII value of 10; so it makes sense that it will run 10 t... (by NickPaul)
Matrix Scale & translation
 
Just a warning that this is for a class and is a lab for homework. I'm not expecting an answer but some help for going the right direction would be awesome. I...
[3 replies] Last: So you want that resultMatrix has the translated points? //main Vecto... (by ne555)
by nogy
help please!!!!
 
how can I terminate this loop using \n (terminate the loop upon pressing enter on keyboard ) this is where i've got so far... #include <iostream> using name...
[7 replies] Last: What they are trying to tell you is that you cannot get a string with ... (by buffbill)
C With Visual C++ Express 2010
 
Quick question. How do I setup VC++ to compile a static library for C? When I compile my project, it states that there're multiple errors but the errors aren'...
[2 replies] Last: Final Update: Nevermind. It appears as though the project was set to... (by closed account zb0S216C)
Accessing Structure Members With 'sizeof( )'
 
It's possible to get member( not methods ) data from a structure by using sizeof( ) . However, when it comes to accessing the next member in the list, I can't ...
[7 replies] Last: Take a look below. Don't mess with the memcpy stuff if you don't have... (by abellia)
unable to compile properly anyone knows why?
 
~~~~~~~~~~~~~~~~~~~
[4 replies] Last: Do you mean nothing is appearing onscreen? Also, where is the functio... (by anonymous23323124)
by HenriK
Different classes/structures as function parameters?
 
Hi, programmers, I have question once again, this time it´s about classes and structures. So, I know it´s OK do something like this: struct MyStruct{ int ...
[12 replies] Last: I understand what you mean - the inheritance, and yes, it is good idea... (by HenriK)
Function help
 
I have been working of a LCM Calculator. I decided to use a function in this program. Here is the Function code: //LCM Function int LCM (int num1,int num2)...
[4 replies] Last: O.K. Thanks. I had completely forgotten about that formula and that's ... (by Nisheeth)
Help Experts
 
#include<iostream> using namespace std; template <typename T> class List { int size; T *values; public: List(): size(0), values(NULL) {} ~List() ...
[14 replies] Last: You'll not learn nothing this way! Which is exactly why you shou... (by Disch)
Question about using namespace
 
we all know that "using namespace std;" will disclose all the name in std library but it is also said that "#include" is like copy the header file in the...
[3 replies] Last: Well defining a class does not put it in a namespace by default. Consi... (by anonymous23323124)
cin.get() question
 
#include <iostream> using namespace std; int main() { char c = 0; while ( c != '\n' ) { cin.get(c); cout << "-"; } cout << endl; return 0; } Why is it tha...
[11 replies] Last: @firedraco- i usually work on windows....nd i use the traditional c c... (by arun thakur)
April 2011 Pages: 123456... 37
  Archived months: [mar2011] [may2011]

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