Beginners - June 2014 (Page 18)

Try to write a search algorithm
 
So I recently have an assignment, which is my final project, to search for a word in multiple documents. In which contains about 5000 words.( Score bases on the...
[2 replies] Last: hm, The teacher clearly instructed that i must use tree as data struct... (by BlackSnowZ)
by Jimyh
Classes
 
Hello I am new to programming, and am having trouble getting my head around classes. Hypothetically I want to create a database for a gym, I want to be a...
[4 replies] Last: As far as I know structs are kind of just records of data, whereas cla... (by Serious Sam)
C++ VS 2010 express Error & problem
 
I am working on creating a program in C++ Visual Studio 2010 express ,below are he requirements. I am coming up with an error and I am unsure on how to fix it.I...
[3 replies] Last: You have probably selected the wrong type of project. The winafx.h ... (by AbstractionAnon)
Function error
 
I am writing a section of code to display the median score, I am receiving a warning that reads. warning C4715: 'findMedian' : not all control paths return a va...
[6 replies] Last: Your suggestion answered my problem, I was reading in the wrong varia... (by DEnumber50)
Psuedocode question
 
How do I write a psuedocode program that generates 100 random numbers, and keeps a count of how many of those random numbers are even and how many are odd
[1 reply] : The easiest way to write pseudocode is the same as writing writing co... (by admkrk)
by klay2
need help with rpg fights
 
oddly, after a battle with any monster including after changing the hp, strength, etc, your health always goes down to one. #include <iostream> #include <...
[1 reply] : oddly, after a battle with any monster including after changing the h... (by cire)
move data between memory addresses
 
Hi! I'd like to write a program which controls an LED matrix. I've written the program to read my matrix, and turn the LED on where the value is one. Now I'd l...
[2 replies] Last: I can't see why what you have should work. Have you considered just b... (by kbw)
structures with functions
 
my knowledge till now tells me to pass structures to functions one must declare structure as global??? clarify please
[8 replies] Last: Yeah, that isn't possible and the compiler shouldn't compile it at all... (by BHX)
No errors or warnings but still crashes
 
Stuck for days....My program compiles without any warnings or errors. however it crashes straight away and doesn't give a reason. If I debug it I get these mess...
[3 replies] Last: yep should have been pTextureRoot = e; still getting segment faults d... (by jadegnan)
by mehak
type-checking
 
what is static and dynamic type checking in c++?
[1 reply] : I don't know about C++, and please someone correct me if what I say is... (by Serious Sam)
Sort two arrays together
 
I am trying to using two arrays, one to store name and another to store persons age. I have the arrays created and have been able to get the data in and displa...
[1 reply] : I think it would be better if you use an object where you store a name... (by Serious Sam)
by mehak
polymorphism
 
" The compiler checks the type of reference in the object and not the type of object".How is this statement correct in context of polymorphism?
[1 reply] : It isn't correct or even meaningful as written, but thanks for the tip... (by Cubbi)
fstream.open() or fstream.close() don't affect, file is always open
 
what is the problem with this code files are always open EVEN BEFORE using fstream.open() and EVEN AFTER using fstream.open() What is the problem in here? ...
[4 replies] Last: Oh I'm so sorry guys I didn't know about is_open() being the actual fi... (by danicpp)
Difference between 2 swap options
 
Is there difference between swap (x, y) and temp = x; x = y; y = temp; ? void insertionSort (int array , int size) { int j; int temp; fo...
[2 replies] Last: thx, for telling me. Tho this forum is for "beginners" , I kinda dont ... (by jakvrh1)
Make The User Input Values That is To Be Stored In an Array
 
Hey I am an Noob in C++ Programming ( I admit it) , I am Making a program in which the User should Enter some Numbers and the numbers should be stored in an arr...
[4 replies] Last: Don't you need to initialize the array with a size? No. Where the ... (by AbstractionAnon)
by stlund
Trying to make a game with 2d array. Need some help
 
Hello! Im trying to make a game with an array. So the user types in coordinates and "shoots" / guesses the right spot on the array, (haven't put it out ye...
[1 reply] : Simply replace line 26 with an if statement. [code firstline=26] ... (by AbstractionAnon)
by mehak
composition
 
i came across a statement "composition allows objects of one class to be created inside another class"..can plz somebody elaborate this.thnx in advance for the ...
[1 reply] : class foo { bar m_bar; ... }; Class foo contains an object... (by AbstractionAnon)
by mehak
function returning pointer
 
plz explain the output #include<stdio.h> char* fun() { return("samsung india"); } int main() { printf("%s",printf("electronics")+fun()); } ...
[3 replies] Last: thnx alot (by mehak)
by rfresh
Button does not show at runtime
 
I made a winForm with a button on it in the Designer (VS 2010 C++). But when I run my app, the button does not show on the form. The button visible proper...
[2 replies] Last: #using <System.Drawing.dll> #using <System.Windows.Forms.dll> #using... (by rfresh)
using const keyword
 
I am having a question related to const keyword. I want to know which is the correct way to use it. I have seen both these implementations while I was trying to...
[6 replies] Last: Thanks @cire and @NT3. That helps. (by funprogrammer)
June 2014 Pages: 1... 1617181920... 48
  Archived months: [may2014] [jul2014]

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