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

by tarkes
Pass a vector from a pushbutton in dialog class to ONDRAW () in the view.cpp
 
I am creating an SDI to plot a picture pixel wise using pDC->setpisel() I have a large 2D vector which is generate in PLOT button in a dialog . On pressing the...
[no replies]
Basic Sentence maker
 
Hello guys. I'm just 12-years old and I have developed a simple sentence making program. Here's the code: #include <iostream> using namespace std; int main(){...
[2 replies] Last: [quote=xcalibur0645] "I'm just 12-years old" Age carries no weight. ... (by closed account zb0S216C)
I'm developing compiler(need help with parser).
 
#include <iostream> #include <string> using namespace std; string input; string output; string type; void Scan () { if (input == "Console") {ou...
[1 reply] : If you don't know how to parse, then you may as well stop. Compiler de... (by closed account zb0S216C)
Operator overloading to read in an array
 
I want to read an array into a class i call _Array using the operator ">>", but im stuck as to overloading the function. Here's the code: _Array.h #ifndef ...
[6 replies] Last: Ah, I misread. (It was a long day for me.) Why are you using operator... (by Duthomhas)
String getline function
 
Hello, everyone! Can anyone tell me what is the (cin, not istream) getline function for a string, with some example code if possible, please? Thanks!
[7 replies] Last: Yes I could get .. I was sucess ful in that aspect.. If I click on th... (by tarkes)
Accessing inside a structure via using a struct pointer to a struct pointer
 
#include <stdio.h> struct datastructure { char character; }; void function(struct datastructure** ptr); int main() { struct datastructure t...
[3 replies] Last: HINT : Operator -> has a higher precedence than the * operator. (by guestgulkan)
touching objects in a scene
 
Hello, I randomly generated in a scene, the tetrahedra contained in a box without them coming into contact with the one, nor with the box. I manage to generate ...
[no replies]
by dthkai
LowerCase pointer Function
 
Hi!, I'm trying to make a lowercase function, the problem here is that, I don't know how can I assign a char array to a pointer, I'm using calloc to alloc the m...
[6 replies] Last: Hi!, I did solve this code, without the use of tolower functions, I'm ... (by dthkai)
Operator Overloading <
 
Hey guys, i'm doing a Bin Packing project and need some help with the Overloading of the operator < ! I have a list of objects pack, as a vector. my packs obj...
[3 replies] Last: Try this code, this may work for all the cases: #include <iostream> ... (by pradeep kumar)
VS C++ 2010 help
 
Message deleted.
[3 replies] Last: You don't need to delete your post. http://cplusplus.com/articles/oGL... (by Stewbond)
by Lostzn
please delete this topic
 
please delete this topic
[4 replies] Last: Sigh, another one. Please OP, read this: http://cplusplus.com/articl... (by Stewbond)
debugging when you don't have noticeable errors
 
When your program seams to work as expected and you don't know of any errors, is there still a debugging process you should follow before releasing it. Besides...
[1 reply] : Usually you build a checklist you must see fully checked before releas... (by webJose)
by MAQAH
passing character array from functions
 
I need to pass one charcter, and the function will print the expected result. #include<ncurses.h> void passchar(int=24 , char='f'); int main() { inits...
[2 replies] Last: rather than that is there any way to print the character which we inse... (by MAQAH)
how to get a enum to change colours of sprites
 
okay so i am trying to get my sprite to draw in 4 different colours, everything about the sprite is the same except its position and colour.I am trying to get T...
[no replies]
ifstream and getline
 
What do i want to do is read from a file, one line at a time with the condition of stopping when a certain character or a couple of characters are encountered. ...
[2 replies] Last: that was a terrible thing to omit. excuse me while i shoot myself. in ... (by morgred)
codeblocks gdb error
 
OS: ubuntu 12.04 x64 IDE: CodeBlocks Error: "warning: GDB: failed to set controlling terminal: operation not permitted" Would someone please shed some lig...
[no replies]
pointers1
 
main() { char a,*b; int i; float f; a='Z'; i=20; f=3.14; b=&a; printf("a= %c b=%u\n",*b,b); b=(char *)&i; printf("i= %d b=%u\n",*b,b); b=(char *...
[1 reply] : The type of the expression *b is char . Sending it to printf which ... (by Cubbi)
Memory Leak
 
I'm using Visual Leak Detector and numerous calls to the crtdbg, within Visual Studio 2010, trying to find a memory leak. As best I can tell, I have a calloc...
[12 replies] Last: Thanks moorecm, in my actual code it was virtual already (out of neces... (by ekisner)
new[0] Questions
 
#include <cstddef> int main() { volatile std::size_t zero = 0; char *p1 = new char ; char *p2 = new char ; delete p1; delete p2; } 1)...
[4 replies] Last: According to that link dereferencing a pointer returned as a request... (by ne555)
Read in parameters from file with specified format
 
Hi, I have a problem reading parameters from a file with a certain format. Say, in my Program I have an Integer variable a, one double variable b, and one ...
[4 replies] Last: Thanks, that looks good! (by Tylerich)
June 2012 Pages: 1... 2627282930... 33
  Archived months: [may2012] [jul2012]

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