General C++ Programming - June 2012 (Page 4)

by viliml
Quit early on Tuesdays when the moon is full
 
I have seen the phrase "If you want to quit early on Tuesdays when the moon is full" many times regarding c++ code, almost always followed by if (today=="Tuesd...
[3 replies] Last: but why excatly that phrase? That's not really a valid question bec... (by Flurite)
this simple program fails to proceed
 
#include <iostream> using namespace std; int main() { char greet = "Welcome"; int age; string country; cout << "Please enter your age: "; cin >>...
[1 reply] : http://stackoverflow.com/questions/257091/how-do-i-flush-the-cin-buffe... (by Moschops)
Memory leak after a pointer returns value
 
Hello everyone, Can anyone help me with memory leak. I found memory leak with the pointer Matrix *cc = new Matrix(m) in the function below when I used valgri...
[3 replies] Last: You need to define a copy constructor and an assignment operator too. (by ne555)
AVG PROBLEM READ
 
IF YOU HAVE TROUBLE PROGRAMMING WITH C++ BECAUSE AVG KEEPS SAYING THAT CODE WRITTEN LIKE THIS IS TROJAN: #include <iostream> using namespace std; cout <<...
[3 replies] Last: he didn't compile it, he wrote it on here, I have the same problem wit... (by Zephilinox)
by beakie
String memory issue?
 
Is this way of creating memory valid? struct structTest { char* text; }; struct arrayTest { structTest* field; }; void addBits(arrayTest &z) { z.field ...
[17 replies] Last: OK... just tracked the problem with a watch... I don't think it is a m... (by beakie)
web crawler
 
A simple web crawler in c++ ?
[2 replies] Last: ha (by beakie)
Is 'Qt Quick' worthy to migrate to?
 
Hi Recently, I got familiar with 'Qt Quick' toolset from Nokia to design pretty and intuitive user interfaces. But, it requires me to learn scripting language...
[no replies]
by Nanne
Is it safe to use template <size_t N> to find size of a dynamic array
 
Hi, Is it safe to use the below code to get size of a dynamic array? If not, what kind of problems can I get with it? In my case, I have to pass the arra...
[3 replies] Last: You can't use that with an array whose size is determined at runtime. ... (by kbw)
Help With a Basic Code
 
Okay so I'm trying to do one of the beginner programs which tells a user not to type a certain number. The user then types a number and if it isn't that certain...
[2 replies] Last: 1. You tell the user to input something on line 9, but then he has to ... (by BlackSheep)
by hujing
stringstream bad performance in multithread environment.
 
I use stl ostringstream in the multithreading environment. I found that the execution time of each thread increased linearly as the thread number increased. B...
[9 replies] Last: I am guessing that in your case increments are using locks rather th... (by hujing)
Question about virtual inheritance
 
Hello, I have a few questions about virtual inheritance. When inheriting from a base class virtually, only one base class will be created to be shared with a...
[15 replies] Last: X can only see anything that it would actually have access to itself. ... (by BlackSheep)
Game Development
 
Hello, I've been programming C++ for around three years now and I have good knowledge of the standard C++ library and the Win32 API. I've tried making video ga...
[3 replies] Last: Sounds to me like you need to spend alot more time planning your game ... (by dunmerthief)
Difficulty with C++ GUI
 
The few GUI libraries I tried were confusing. How can I make windows, buttons, text boxes, and program them with my own stuff? Should I switch to Java for...
[13 replies] Last: Thanks for all the excellent replies. I'll try out QT. (by FourSight)
by mx760
heaps implementation
 
Should I implement a heap as a linked list of left, right pointers or should I use arrays? I tend to think linked list is more natural and intuitive to use recu...
[9 replies] Last: You want a priority queue. If you implement it using a heap then the m... (by ne555)
How would i do this?
 
i want to know how to make a program that does this... if(t == 1) { //Send X ammount of packets to IP address(string IP) }
[3 replies] Last: Search Google for C++ and Socket Programming , e.g. -> it may help htt... (by therockon7throw)
search and sort program for class
 
I need urgent help with my code my program is due wednesday evening. program requirements as follows: Write a C++ program, which will read a set of integer v...
[2 replies] Last: Learning by doing, try it, if you fail, try it again, if fail, try it ... (by therockon7throw)
matrix using open file
 
hallo... firstly, i wold like to ask u about matrix.. my project are going using open file format. this is my matrix form . in this case, this is only use fo...
[1 reply] : please put your code nto code syntax, it is not easy to read your code... (by therockon7throw)
by Solo
Creating a random access file from a text file
 
How can a random access file be created from a text file with different types of variables?
[3 replies] Last: please put your code nto code syntax, it is not easy to read your code... (by therockon7throw)
by beakie
Pass a type into a function or something else? (1,2)
 
I have the following (incomplete) code... Is there a way to have a single function that perhaps passes a type (or something) to do what is the same job to th...
[21 replies] Last: @Abramus: From the information I was initially presented, no, the algo... (by Ikaron)
by Ezio
need some help
 
Hi. I have to do an exercise in C++, I hope someone can help me. Here is the exercise: Write a C++ Console application working in coloured text and graphical r...
[9 replies] Last: Hi Ezio, Here is another thought hope it's not too late: sounds like... (by TheIdeasMan)
June 2012 Pages: 123456... 33
  Archived months: [may2012] [jul2012]

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