General C++ Programming - August 2012 (Page 2)

Tranfer to c++
 
Hello, I am having a huge problem trying to transfer this to c++. I guess your not supposed to use fgets or fopen with c++. can anyone help me please. ...
[3 replies] Last: It really helps if you tell us what the problem is. (by Disch)
by Zeikoh
Strange Project Idea?
 
Hello all, I thought about doing some strange project to help me gain more experience in C++ since I've been neglecting it for other things such as BlitzBasi...
[7 replies] Last: Thanks, but that's okay, I wanted to do this on my own as a learning ... (by jason9559)
Specify a file name to save
 
I'm creating a Sudoku game, and would like to save to board contents to a file. I have it to work with a known file name, but would like to be able to specify a...
[4 replies] Last: Check out dirent.h your API Will do. I found the dirent.h file and... (by whitenite1)
How to trace in dev-cpp
 
how do i trace the cpp programs in dev-cpp as we used to trace in the old blue screen turbo C using F7.
[no replies]
by R0mai
Can the compiler made to output trace information
 
Hi guys, I recently got familiar with the -pg option for compilers, which makes your program generate profiling information while running. (See: http://www.c...
[1 reply] : http://stackoverflow.com/questions/311840/tool-to-trace-local-function... (by ne555)
QtSDK build errors
 
I've downloaded/installed the QtSDK for windows. I tried to run one of their sample projects but got this error: 10:58:51: Running build steps for proj...
[no replies]
IEEE754
 
Hi, I need a platform independent function for producing the exact hex for this format and so far this is what I've done: ui8* HEX::GetHexFromSF_IEEE754( Text...
[12 replies] Last: I forgot to add this to bottom of last function i = 0; iEnd = 8; ... (by awsdert)
Doubt in virtual function
 
Hi all, I was browsing through a code and found one thing which sort of confused me. There is a base class in which a function was defined as virtual ...
[5 replies] Last: No, not unless you overload it or make it a variadic function. (by MrHutch)
by beakie
MACROS - what can u do with them?
 
Can I use them to customise the header file??? I only want to include SomeStruct if I have defined MYARRAYSIZE My Header File #ifdef MYARRAYSIZE struct Some...
[2 replies] Last: @BlackSheep : there is already a class for this in the standard : std... (by R0mai)
String get's recognized as boolean?
 
Can anyone tell me why this happens. I have a class with couple of member functions which are overloaded with different types. The goal was to mimic the behavio...
[4 replies] Last: Nice, thank you very much for clearing that up :=) (by doddolfur)
confusing output
 
#include<iostream.h> class A{ public: char a; }; class B:public A{ public: int b; }; void main(){ B ob; cout<<sizeof ob<<endl; } this...
[1 reply] : This should answer your question : http://en.wikipedia.org/wiki/Data_s... (by R0mai)
Vector of Structures - Memory
 
Hi all, I would like to know what would happen in the following scenario struct my_struct{ int a; int b ; }; class A{ void foo(){ ...
[6 replies] Last: The vector will take care of it automatically. Its destructor deletes ... (by BlackSheep)
by JackG
Mixed Languages Compile AND Link (Cobol calling C++)
 
Hello Experts, I am trying to call a C++ program from a Cobol program. I have searched all over for 3.5 weeks, and this is driving me crazy. I am running CY...
[5 replies] Last: I know virtually nothing about COBOL, let alone COBOL to C++ interoper... (by JLBorges)
error with getchar
 
the programe is not wOrking prOpertly with getchar() only......it is wOrking with gt ch,getche and cin bt nOt with getchar.....:( here iss the prOg cOde..... ...
[2 replies] Last: Add this statement before your getchar call: while (cin.readsome(&t... (by broser)
Need help with an Array in a class
 
the average.h (header file) #ifndef H_average #define H_average class average { public: void setFunctions (int n , int t); int getNum () const;...
[1 reply] : You mean here: int average::Sum () const { for (n = 0; n < 100; n +... (by BlackSheep)
main.cpp not finding functions in class
 
Solved it myself, never mind!
[no replies]
**Array of *arrays
 
I am trying to make a **array that holds a char*array and was wondering how I would do that. I wanted to do something like child **parent=new child* ; but that ...
[2 replies] Last: char **parent = new char* ; for(size_t i = 0; i < NUM_STRINGS; ++i)... (by BlackSheep)
Whats going on with accessing my array via a pointer?
 
Hi, Please forgive me if I am asking a silly question but I am trying to understand what the following code is doing as I am trying to convert it to delphi a...
[4 replies] Last: Thank you all very much, I now understand whats going on and how the v... (by jaymac78)
Search PI for missing sequence digits
 
Hi I know there are plenty of places out there where a person can track down digit sequences within a sequence, BUT what I am looking to do and cannot seem to ...
[17 replies] Last: There's nothing to create. You find the .exe file somewhere in the pro... (by Athar)
structures with pointers.find the output
 
#include<conio.h> #include<stdio.h> void main() { struct st { int i; struct st *j; }t1,t2; clrscr(); t1.i=123; t2.i=456; t1.j=&t2; t2.j...
[2 replies] Last: Oh I see the difference now. Trying to call a pointer with " . " ins... (by Anthony Hernandez)
August 2012 Pages: 1234... 31
  Archived months: [jul2012] [sep2012]

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