General C++ Programming - July 2012 (Page 14)

Palindrom question
 
im coding to guess nth palindrome number. for example 12th palindrome number is 33 I have been tried to write the code to find next palindrome number ...
[1 reply] : http://www.cplusplus.com/forum/general/75452/ (by viliml)
by iMunk
Struct, passing like parameter to a function
 
Hi guys, This it's my first post, but I have few hours with a problem. Basically I need pass a array to a function, but the array it's a variable of the o...
[3 replies] Last: An int doesn't have a miembro1 member. So you must declare the functi... (by webJose)
by DBarzo
Object not destroyed
 
Hi, I have the following scenario: The Interface header file: #ifdef WIN32 #define DLL_CALL __stdcall #else #define DLL_CALL #endif class DLLInt...
[1 reply] : Found.... I forgot to derive InterfaceA from DLLInterface: struct I... (by DBarzo)
Help required
 
Hi All, I am facing a issue with my stack code. Please help me in identifying the error and rectifying it. Here's my pop code: int Stack::pop(NODE *he...
[12 replies] Last: wow.........thanks warnis....... thanks for making my day.........i n... (by anubhavjain346)
FreeConsole(false);
 
obviously you cannot do something like FreeConsole(false); so how would i make FreeConsole(); stop in its tracks? i use while(1) { FreeConsole(); } how would...
[6 replies] Last: Detaches the calling process from its console. Syntax BOOL WINAPI Fre... (by mar2u)
[C]Segmentation error
 
I made a program using smtp and pop3, it is a switch to choose smtp and pop3, the program in the first starts, in the second iteration have a core dump in the l...
[11 replies] Last: The syntax error is because you declared GetMailAddress() before you d... (by kbw)
by vrakas
Sort of <algorithm> problem
 
hello, I have 2 int arrays Mass and Volume , and i need to sort them according to their quotient(M /V ) i.e. density. (oh and I want to use the sort of <alg...
[8 replies] Last: Ther eis a much much easier way which requires only for you to make a ... (by viliml)
different type of integer?
 
done
[1 reply] : I never heard of an integer type called done . What do you mean by th... (by viliml)
static into dynamic
 
Hi. can someone tell me why the following is correct and will compile: int static_Array ; dynamic_Array = new int ; dynamic_Array = static_Array; but the o...
[3 replies] Last: Static arrays are constant pointers <technicality> Static arrays ... (by Disch)
by matt3m
max variables
 
Hi, I have n variables and a corresponding nxn matrix. I want to pair them into n/2 groups (assume n even) according to largest number in the matrix. What i...
[no replies]
Difference between C++/C# and Scripting Languages (1,2)
 
What's the difference between the two? Are there things that scripting languages can do that C does not? Are scripting languages higher level programming? Is th...
[22 replies] Last: Basically C# has more advantage than using C/C++. But it also depends ... (by Ahnaf Mustakin)
problem in printing the second element in map which is a vector
 
Can anyone please help me in this the program is to define a map in which the key will be the surname and the element will be vector which contains the names...
[1 reply] : Hint: What data type is this? iter->second (by ToniAz)
Help in c++
 
Here is a link that would help you guys with c++, still working on the tutorials, more to come. http://www.youtube.com/channel/UCv401cabwxQhuyL4GC4_EMw/videos
[1 reply] : It's nice post. helpful. thanks.. (by acn)
search for string between new line chars in file
 
Hello, I am making a program to solve word jumbles. It takes in an a string and finds all permutations of the characters and for each permutation checks the str...
[3 replies] Last: Solved it. I got confused on what getline() did. the code works perfec... (by ryco117)
Segmentation fault in linked list copy constructor
 
Hi, homework problem here. This should be simple to fix but I can't seem to figure it out. The problem lies in the copy constructor, I'll post the code I wrote ...
[no replies]
Angular point movement
 
I forget the maths behind moving a point using its rotation in radians. I thought it was something like the code I have below, but it seems to be incorrect as i...
[1 reply] : Suppose you want to rotate p around center by theta radians: vector ... (by helios)
Windows and ncurses
 
I am creating a text game using c++ and ncurses. Is there anyway to get ncurses to work on windows or a similar component that at least can capture text and ...
[3 replies] Last: I saw "or similar component" and thought of SFML. My bad. (by Computergeek01)
Add an element to an array at a particular location
 
Here is my attempt: int add(int e , int size , int a , int loc){ int flag = -1 ; if(loc < size){ flag = 0 ; for(int i=size; i<=...
[7 replies] Last: np :D yes, sorting subsets of an array while staying in bounds of that... (by soranz)
pointer array access
 
I've prtogrammed a little game. it has multiple classes thaht represent multiple objects in the game (player,enemies, walls...). all the classes are based on ...
[6 replies] Last: sorry but i get this error in the console: segmentation fault (core du... (by Marvin Wyss)
Problem with a pointer to a class pointer
 
Im getting an "expression must have pointer-to-class type" error in a function where i have a pointer to a class pointer passed in to. Strange thing is if i cas...
[2 replies] Last: It works :) thank you very much helios :) (by Hippie Salad)
July 2012 Pages: 1... 1213141516... 30
  Archived months: [jun2012] [aug2012]

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