General C++ Programming - September 2012 (Page 31)

string question
 
Question: After dinner at a Chinese restaurant, Batman and Robin had a fortune cookie each. Both cookies contained the same fortune written on a single line ...
[2 replies] Last: One thread per question, please. http://www.cplusplus.com/forum/gener... (by Moschops)
making consistency of data member in the whole programme without using static keyword
 
In the below programme i use one boolean variable named check , which is being accessed inside main function by two objects of Tst1 and Test2 . But the value of...
[5 replies] Last: I don't know. I don't think so. (by helios)
QMainWindow toolbar in Qt
 
QMainWindow comes with a default toolbar. How do I find this toolbar? In other words what is the equivalent of QMainWindow:: menuBar() ? Thanks!
[1 reply] : Looks like you have to 'find' them - as they appear not to be a specif... (by guestgulkan)
Find float in *.txt file
 
I don't know how to solve following problem. I am programming with codeblocks in C++ under Windows7. The program will be a 32 bit console application. I have Bo...
[4 replies] Last: > I was looking for some hints The hint was 'divide and conquer'. In ... (by JLBorges)
***Making a Particle System Loader
 
Im making a particle system engine where it loads and reads files like "smoke_effect.ps" and then makes a 'ParticleSystem' class that is stored in an array ...
[3 replies] Last: int valueInt; map<Variables, int> valuesMap; valueInt = 10; ... (by BlackSheep)
by ostar2
help with Ncurses getch()
 
Hello, I am trying to use ncurses but I have run into a problem. Here is my code. Any help is greatly appreciated. Code: #include <cstdlib> #include <iost...
[8 replies] Last: I figured it out. (by ostar2)
by beakie
Deleting structs from memory
 
I have a struct which inherits from 2 structs. If I delete an instance of StructAB using a StructA pointer, will it also delete the contents of StructB? ...
[3 replies] Last: I think this is it. THIS is where my memory has been going!!!!! ... (by beakie)
Constructing an indefinite amount of objects out of the same class
 
Hey there, I've been writing a program with SDL and what I want it to do is to create a dot on the screen wherever I click. What I have (Code in the bottom o...
[3 replies] Last: // DRAWING STARTS HERE for (std::vector<dot>::iterat... (by Disch)
deleting char array
 
#include <iostream> #include <string.h> #include <stdio.h> #include <stdlib.h> using namespace std; int main() { char str ; char *buffer; int i,...
[2 replies] Last: Ah! That explains. Thanks AbstractionAnon (by sharingan)
by rithan
Need help to wrap my project
 
void Combine(string x,string y,string z) { int flag=0; string a,b,c,d,e,f,g,h; for(int i=0; i<lecturer.size();i++) // Fetch lecturer's faculty if(...
[1 reply] : Do you have a declaration for Combine in a header file or as a forwa... (by AbstractionAnon)
Need help in adding movements!!
 
I am using Allegro 5. What I want to do is that certain sprites will be displayed when I press a key. For example when I press space bar the character will grab...
[no replies]
String operation
 
hello guys i want to print the first n characters of a string where n can be variable in cpp. is there a function that can return the above mentioned string or ...
[1 reply] : http://www.cplusplus.com/reference/string/string/substr/ (by Moschops)
Compiler: Back-end
 
I have often thought of making my own language, but have always come to the road block that is the back-end. I have translated my code into assembly, now how do...
[7 replies] Last: You need to take the Assembly instructions, and encode them so that th... (by closed account zb0S216C)
Seperating an integer number into digits (1,2)
 
Hi everyone, I have something like: int number = 789; vector<int> myvector; I would like to separate 789 into its digits and insert them into myvect...
[20 replies] Last: I don't remember now if it was VC++ 2008 or VC++ 2010 - but the last t... (by JLBorges)
by lyc
which compiler is good to use
 
maybe somebody woulde tell me the best popular compiler.
[7 replies] Last: If you want an IDE to go with it, http://sourceforge.net/projects/code... (by Zephilinox)
PROGRAM CRASHES AND SWITCHES MY COMPUTER OFF
 
Hi there, I want to read the two strings in the program below into two linked lists but the program crashes and switches my computer off after I run it. Any ide...
[3 replies] Last: @Peter87, thank you. I missed that line all together. I managed to fix... (by ayanda83)
What is the destiny of the Borland Tasm?
 
After reading one thread in this forum I am interesting what is the destiny of the Borland Turbo Assembler? Does anybody know? I liked its Ideal mode when I use...
[no replies]
input string stream question . please help
 
2 #include <string> 3 #include <sstream> 4 5 using namespace std; 6 7 int main() 8 { 9 string piece1, piece2, word, secondword, secon...
[2 replies] Last: doesn't work i cant seem to be able to get the second last word of th... (by james16)
by ProfN
File I/O Onto Variables
 
Ok, I am trying to write a bit of code that takes data from a file and uses it directly in the code. Here is a piece of code where only one line can be stored a...
[4 replies] Last: Use an array or vector. std::ifstream myfile ("example.txt"); std::v... (by Stewbond)
Pointer array's addresses reset outside constructor
 
I'm having a problem with a 2d pointer array. Outside of the constructor, the addresses seem to get reset. I don't understand, exactly, what's happening. : ( W...
[5 replies] Last: I think I needed to create the array as HUSBAND1 + 1 Yes, it looks t... (by shacktar)
September 2012 Pages: 1... 29303132
  Archived months: [aug2012] [oct2012]

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