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

Urgent...!!
 
Can we declare an array dynamically in structures ? as in if that array is a variable of that structure...
[4 replies] Last: You define a pointer in the structure, and then when you need the arra... (by Moschops)
Help me with my project please!
 
#include <iostream> #include <fstream> #include <vector> #include <ctime> #include"dos.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #i...
[no replies]
Template sort being cast to const
 
I have this bit of code, which was working, I changed something in another part of code and recompiled and now all of a sudden I'm getting "you cannot assign va...
[5 replies] Last: This sounds really like a const-correctness problem. Is it possible th... (by mtrenkmann)
sorting linked list
 
so i have the following code, it inserts a number to a list and then i call my sort function which is below this function, the problem is that my sort function ...
[no replies]
Arithmetic
 
Hi guys, just wondered if like you have =+, == you can have *= and what exactly does it mean? I have a function s.t. d_hash *= (0.5*(sqrt(5)-1)); ...
[2 replies] Last: thanks - I was thinking my lecturer really should just use a constant,... (by redrubia)
SIGSEGV Error Cause??????
 
Help me figure out why I am getting a SIGSEGV error while submitting at SPOJ. Also is there a utility by which we can check the cause of such signals in our pr...
[6 replies] Last: My program runs absolutely fine for the test case. To fix the bug, i... (by Moschops)
Structures problem
 
Hi everyone, I am learning C++ and I must write a program that prints the contents of a struct called Article. So far so good. Any article has the following cha...
[6 replies] Last: Hi first change your struct, add a constructor for example; struct a... (by therockon7throw)
About passing a fstream type parameter into a function
 
Guys, I know some basic knowledge about passing parameter into subfunctions, but as I really don't know how fstream type actually work, I can't be 100% sure abo...
[3 replies] Last: Correct. (by Duthomhas)
Virtual member function overriding
 
Is there any way to do something like this? class Base { public virtual void Get() = 0; virtual ~Base(); }; class Derived1 : Base { priva...
[6 replies] Last: another solution in C may be like following class Base { public... (by therockon7throw)
Backspace and arrow keys in C++ graphics
 
Hi. I was trying to make a text editor using C++ graphics. I am using TC++. For backspace, I move the cursor by 8 pixels(default character size) and print a re...
[no replies]
looking for list class
 
I'm tinkering with a list<string>. Are there any 'native' list classes/functions that handle: Inserting new node at the end. Deleting a known node. starts it...
[4 replies] Last: Oh I just thought it was kind of silly to even hope for a native metho... (by liquidfuzz)
C++ for Android?
 
I heard that Android now supports applications written in c++. I also heard that they don't want you to write full programs in c++, but I don't know why. Is thi...
[1 reply] : http://developer.android.com/sdk/index.html Mostly Java, but you can ... (by webJose)
sqlite3 and C++
 
heres the part of code i am writing for using sqlite3 and its an error i can't comprehend invalid operands of types 'const char ' and '<unresolved overl...
[5 replies] Last: cout << azColName << " = " << (argv ? argv : "NULL") <<endl; ... (by ne555)
SDL_image SDL_FreeSurface segfault
 
I'm not sure which forum this goes in, so I just put this in here. I am making a map renderer for my small (at the moment) game. I loaded an image using SDL_ima...
[16 replies] Last: yes I THINK I compiled SDL_Image incorrectly (by firefly431)
Project Euler 14 Issue
 
I can't seem to find the issue. I'm not sure if it is a small bug fix or a major problem. It outputs 910107, which according to projecteuler.net is not correct....
[5 replies] Last: Oh yes i completely understand. Thanks alot for the help though. (by physj314)
calculating employees salary
 
Guys here is question. write a program that will calculate salary for empleyes. use two overloaded functions named calcSalary. first function calculate sala...
[2 replies] Last: more elaboration will be much better to understand ur ponts. (by sollymoela)
MY PROGRAM IS NOT OUTPUTTING ANYTHING ON THE OUTPUT FILE
 
****************************************************************************************************************************************************************...
[7 replies] Last: You have assigned a ' ' (space) to a variable called 'space'. And what... (by greenscar)
Search specific pair/triple word in a paragraphs
 
Hi you all, i have a function that searches paragraphs in a file and compares whether within that particular paragraph, there is word or pair/triple-word. Up to...
[8 replies] Last: Thanks JLBorges!!!... A really good and fast solution.... Cheers!!!!!... (by MacGregor)
Polymorphism and List problem
 
Hi All, I have a particular scenario below. The code below should print 'say()' function of B and C class and print 'B says..' and 'C says...' but it doesnt .A...
[3 replies] Last: In order to experience polymorphic behaviour you need to call your mem... (by Galik)
by MCreel
If Else statements that affect equations
 
Hello, I'm new and have what is probably a fairly basic question/problem. I haven't been able to find any threads that answer my specific question - but maybe I...
[3 replies] Last: Try changing the condition of your if statements to this if (answerS... (by greenscar)
February 2012 Pages: 1... 2627282930... 43
  Archived months: [jan2012] [mar2012]

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