General C++ Programming - August 2013 (Page 4)

by AMOLED
[HELP PLEASE]
 
How do I code this. What is the proper coding for this problem? Thanks in advance :) Read and format a list of amounts in a file named AMOUNT.TXT. It shou...
[8 replies] Last: This doesn't look like your previous program, and you didn't even use ... (by LB)
by Ceset
SDL_GetTicks()
 
SDL_GetTicks() function. it stores the first time program started and gives you the value how much time has passed since the first execution. yeah here is the q...
[7 replies] Last: i removed my question from here because it was something out of this t... (by Ceset)
Reading whole file into std::string
 
I have been using this: std::ifstream in("name.txt"); std::string s((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>()); The file I am...
[7 replies] Last: Doesn't that code read one char at a time from a file stream? I would... (by kbw)
Convenient name for a sorting function.
 
Let assume that I wrote a function that uses the selection sort algorithm to sort some sequence in descending order. What is the more convenient name for it? ...
[no replies]
by vRltwE
Using Cygwin compilers in Qt Creator
 
Is it possible to use Cygwin compilers in Qt Creator (considering that Qt Creator is installed normally under Windows)? Thanks in advance.
[no replies]
Help: error C2039: 'to_string' : is not a member of 'std'
 
Hi, I am trying to convert "int" to "string" on VS-2008 and I am getting the following errors: error C2039: 'to_string' : is not a member of 'std' err...
[4 replies] Last: My knowledge of C++ is limited; so, would you please tell me what is ... (by Disch)
How to 1 more formula in C++?
 
How to 1 more formula in the program? Inside the program got 1 formula, so I want add 1 more formula. If add 1 more, it be 2 formula in the program. I want to r...
[13 replies] Last: OK... Thank you :) (by ajith55)
What is the error in this code?
 
For a school homework i had to make a c++ program to generate a report card so i made this program #include<iostream.h> #include<conio.h> void main() { ...
[5 replies] Last: Three choices: 1) using namespace std; -- This is not recommended as... (by keskiverto)
by Luk3
How to create a global object/instance of a class? (1,2)
 
Hi, I'm new in object oriented programming. I need help creating a global object/instance of a class, that can be used by any function. Does anyone knows a s...
[30 replies] Last: http://xkcd.com/619/ (by LB)
Need guides in understanding the codes
 
Hi guys, can someone explain me on what does these codes did? this is only part of the code... // Create the window of the application sf::RenderWindow m...
[1 reply] : The meaning of: float dragOffsetX, dragOffsetY; dragOffsetX = dragOff... (by keskiverto)
by Ceset
frame per second algorithm
 
hi. i was trying to achieve a better way of game looping. so i have a game loop algrithm. but i dont think its quite good. i want it to be better. and maybe u p...
[2 replies] Last: @Disch well. first of all. ty for your detailed and informative answer... (by Ceset)
Basic in c++
 
I am a new leaner i want to know every thing abaut these great language so i need help from all c++ programer including experts in this field thanks
[7 replies] Last: if you need it to pass the exam, properly try to remember all the char... (by Hzj jie)
by Snaksa
What should I learn next
 
Hello! I' studying C++ for around a year. I can work with recursion and I know how to implement data structures like stack, linked list, binary tree, graph etc....
[11 replies] Last: it turns out to be a very interesting question. briefly, languages, no... (by Hzj jie)
Recursion with linked list
 
I have a linked list I made and am practicing a simple recursion function sum() which returns the sum of all numbers in each node of the list. I don't think th...
[1 reply] : Have you initialised the tail node's next to null? EDIT: Also, it app... (by Script Coder)
constructor that initializes a pointer to point to the object
 
I have a program that has a base class 'control' and there are 2 dervied classes 'button' and 'textbox'. How do i make a constructor in the 'button' or 'textbo...
[7 replies] Last: I mean tabstop should be a secondary property - it should be a result ... (by LB)
Binary Operations
 
Code: #include <iostream> #include <string> using namespace std; void process(string operator, int first_bit, int second_bit) { if (operator == "AND") { if ...
[2 replies] Last: I see. Thanks for your help. (by helpstudent)
Revamping your entire code due to new C++ functions
 
I just have a general question about how you programmers go about making use of new C++ functions when you've written a huge program pre C++11. Let's say you u...
[2 replies] Last: The tools you mention were around since about 1994 (which was the firs... (by Cubbi)
Operator new needs curly braces () for array
 
Right well I've got this error and I don't know where to go from here because I can't find out how to get rid of it. I'm afraid I don't actually know where the ...
[11 replies] Last: YYYEEEAAAAAAHHHHHHH.... Okay thanks guys!!! I went in search for the ... (by TheBeardedQuack)
How to convert a char to a CString
 
Hey, I am trying to convert a char to a CString, I have tried to use the CString.Format method but didn't work. I have a char(char holder ) and I want to see i...
[3 replies] Last: Andywestken, Thanks will try. Yes, I am using MFC. (by tnjgraham)
MergeSortandCountingInversions
 
I tried to program a version of this algorithm, however, firstly, i got some heap problems regarding writting after the buffer. Now simply while compiling i get...
[no replies]
August 2013 Pages: 123456... 28
  Archived months: [jul2013] [sep2013]

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