General C++ Programming - April 2012 (Page 44)

how do i make a button do an action?
 
say maybe, if i pressed the button maybe it would output a message that says "hi"?
[4 replies] Last: windows (by Invader2010)
Type of a expression
 
Consider this code: unsigned char alpha = 0xff; unsigned short result = alpha << 12; I thought that expression alpha << 12 results in 0 as 'alpha' is '...
[3 replies] Last: > So it depends on the type of lvalue on the left side of the '=' sign... (by JLBorges)
Tellg() + "\r\n" (windows newline) malfunction. (.csv file)
 
Hi everybody, I've already posted in the beginners forum a problem I was facing, and after all, I've realized there seems to be a heavy problem (maybe a bug?) ...
[4 replies] Last: Ok, now I get it! I can use binary mode to use tellg() and still use g... (by JCaselles)
Help with embedding python into C++
 
Hello, I hope this is in the right topic! Please could someone tell me how to use the embedding features of python. I know how to use "PyRun_SimpleString();" ...
[no replies]
Problems in bitwise operation
 
Dear Sirs, I need to write a function that, given in input two long numbers in the interval (0,pow(2,L))(L is given in input), can count how many different bi...
[3 replies] Last: Thank you very much! That was the problem and I don't think I would no... (by chianda)
Overloading method for a specific type in a template class
 
Hi fellow programmers of cplusplus! I am wondering if it is possible to have an overloaded function of a specific type in a template class. If it is possible, h...
[10 replies] Last: ne555: You're right. I managed to overload a single method using te... (by faizalabdrahman)
Uninitialized variables (1,2)
 
Can anyone tell me why uninitialized SHORT variables in C++ console applications always default -13108 and INT variables to -858993460. Just curious.
[21 replies] Last: Nope, it wasn't me. Perhaps this feature shouldn't be anonymous (by krystalsdad)
by Jggrnt
Building a map, calculating distance on it
 
Hello. I am studying for informatic olimpics. In a question I need to build a map and be able to tell distance between buildings. For example, a city map...
[2 replies] Last: Thanks for the help. I succesfully created the city map. But, I may... (by Jggrnt)
template error
 
I am doing a linked list program in cpp . I am getting an error at line 7 saying that start_list is not a template.what is the wrong I am doing? But this co...
[1 reply] : Are you trying to use std::iterator ? http://www.cplusplus.com/referen... (by R0mai)
by digrev
i am getting a lot of errors
 
hi , i am trying to learn c++ and i just copied and paste a sample but i am getting errors 13 C:\Users\habour0\Documents\Untitled2.cpp `cout' undeclared (fi...
[2 replies] Last: There is a little mistake i guess... What are these symbols: ‹› ?... (by S G H)
by ARWA
garbge value in the output..~.~
 
hi, when i display my array of charecter it displays the massage inside it and some junk values were i have sepecified the size of the array and what it dis...
[1 reply] : 'newFrams' requires the trailing 0. On line 9 write newFrams=new char... (by coder777)
Char and switch statement issues
 
Hello, I've just started learning C++, and I can't figure out the issue with my code. I've tried a few different ways to get a switch to work with a single dec...
[1 reply] : char my_Command ; my_Command is a pointer to a char. I suspect you ... (by Moschops)
by Smoke
Incorrect Strlen value returned
 
I receiving an incorrect strlen value of a, it return 101 instead of 100, has anyone come across this error before? Has it been corrupted during conversion. ...
[2 replies] Last: The strlen function tells you how many chars there are from a pointer ... (by Moschops)
by atjm88
RGB to Gray Image
 
Hi, can anyone tell me how to convert RGB image into Gray Scale Image using C++? Thanks... I've tried it using C++ in OpenCv but don't know how to show it ins...
[6 replies] Last: Thanks ne555, I've change the line to the one below using imshow, but ... (by atjm88)
random drawing tool
 
i have a list on names in a csv format, i want to create a random draing tool that will pick 5 winners from this list.
[no replies]
How to count the number of unique characters in a string?
 
Hi guys, I'm trying to implement a bit of code in a program i have made but I'm kind of stuck on how to actually do it. What i want is to be able to count...
[no replies]
N Queens Backtracking Algorithm Confusion
 
Hi, I am trying to understand how to use backtracking to solve the n queens problem. I do not know how to use stacks, and I've never used multidimensional array...
[no replies]
Including all of the files in a directory
 
In an attempt to add a bit of modability to my game, I want to make it so that all of the .cpp/.h files in a certain directory are included. Files are NOT my st...
[2 replies] Last: Take a look at boost::filesystem. It will let you iterate through eac... (by Stewbond)
Segmentation Fault: Dynamic Array of Strings
 
This program is supposed to allow the user to enter 5 names and then add one, delete one, and try to delete one that's not on the list. I can add one, but keep ...
[1 reply] : just found the error: I never initialized index to 0 (by lasxx005)
April 2012 Pages: 1... 4243444546... 49
  Archived months: [mar2012] [may2012]

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