Beginners - May 2014 (Page 4)

Insert Value in Array using FOR?
 
Hey i cant insert succesfully values in my array without losing the last value. I need it to work this way e.g; Array: 1)1 2)2 3)3 4)5 ------ inse...
[1 reply] : Are you sure they ask you to use arrays, and not vectors for this? T... (by Codermik)
Problem with <fstream>
 
Hi guys, Hopefully someone can help me here. I have been working through the book "C++ programming in easy steps" using code::blocks and have come to the wri...
[3 replies] Last: Thanks the help there guys, I did not realize it wasn't supposed to ap... (by awakeallhours)
Make a sprite follow a path
 
Let's say I am working on my own engine using SDL. I am working on a game that has lily pads moving down a stream and I want the pads to follow a certain pa...
[13 replies] Last: oh very true! erock (by Hambone)
HashCode
 
Hello , What is the most efficient algorithm applied on strings that generates a unique hash code ? I need this algorithm to apply on the words of a dict...
[3 replies] Last: Thank you , the links were very helpful , i will be testing these has... (by dawibob)
Dynamic Array Compile error
 
I have several compile errors which I cannot for the life of me fix #include <cstdlib> #include <string> #include <iostream> string* addEntry(strin...
[3 replies] Last: This is what you use now: string* foo( string* bar ); bar is an a... (by keskiverto)
by venros
C++ Vector Swap with multiple objects - not working propperly
 
Hi guys, I'm having an issue with my show rank function: void HighScore::ShowRank(HighScore & account) { if(account.highScore.size() == 0){ cout << "The...
[4 replies] Last: The swap function is a simple bubble sort which def works for me. What... (by venros)
Invalid Array Subscript HELP!
 
I cannot compile my code due to errors found in line 78 #include <iostream> #include <cstdlib> //header for dynamic memory management using namespace st...
[3 replies] Last: hey it has solved the problem! thank you very much (by alex067)
Can't Help Translating From Morse to Text
 
Hi Everyone, I am fairly new to C++ and I have been stuck on a problem for about a week now. I was able to convert from text to morse, but am having a d...
[1 reply] : Maybe this will help you get started. #include<iostream> #include<... (by SamuelAdams)
Exit from console using any letter, example 'E'.
 
I have been working on this for long, I can get it working, but I need to use a letter to exit, am sure am missing something, please point me on the right track...
[4 replies] Last: you should delete line 42, because when you write goto then your progr... (by amirtork)
Best online video tutorials
 
In you opinion, who teaches c++ the best on youtube?
[3 replies] Last: SDL is written in c++, so yes if you have a good foundation of c++ you... (by Smac89)
Else if and functions.
 
I'm creating a basic car rental program, which also takes the details of the customer and shows it all as a nicely formatted invoice. Except i'm not that great ...
[9 replies] Last: I read the solution but it seems a bit more than my brain can take rig... (by Laflaga)
Files counting
 
Hi i have two directories (for windows readed from file so i can add more or less then i want too) data_install data_main. Each has different number of random f...
[3 replies] Last: FindFirstFile and FindNextFile does anyone know how to properlly use i... (by ovisss4)
Function prototypes
 
Just wondering should i just put my function before main so i dont have to prototype or after main and prototype? So this: int temp(); int main() { }...
[3 replies] Last: Thank you. That cleared up a lot of things.. (by darkn3ss)
Ways to write a string of characters
 
Hi all, Could someone please shed some light on the following? I define a string of characters with char* foo = "pimpalicious"; Whenever I try ...
[3 replies] Last: The first one declares a pointer to a string constant. A string consta... (by Smac89)
Setting Up a Data Structure
 
Hello All, Beginner to C++ here. Can some please give me a few hints to help set up a data structure. Basically I need a way for someone ordering this fast foo...
[2 replies] Last: You're missing the point of using structures. You create a menu struc... (by AbstractionAnon)
don't understand "insert" is ambiguous error message
 
Code below compiles and run with VS2013 but it does not compile with g++ 4.8.2. Getting 'insert' is ambiguous error message. Spent many hours trying to figure i...
[6 replies] Last: It is a very strange bacause it works as posted. http://coliru.stacked... (by MiiNiPaa)
by DTrey
Exceptions
 
Given a Constructor: Account(std::string aN, std::string ss, std::string n, double b); Implement the constructor for the account class. Throw an exception if a...
[1 reply] : #include <iostream> bool checkAlpha(std::string Name); int main(... (by Codermik)
by Auroch
Displaying result of addition of vectors
 
Hello everybody! I'm trying to display the result of addition of vectors. But Builder shows the error after compilation (line 29). What should I change for in ...
[4 replies] Last: Hey AbstractionAnon, first off thank you for your insight, your explan... (by Auroch)
by DTrey
Boolean Function (1,2)
 
A mathematical set is a collection of non repeating elements. Write a function to test whether an array of arbitrary size containing only digits from 0-9 is a s...
[34 replies] Last: Worked Great Thanks A Ton. Really appreciate the help. (by DTrey)
Cannot convert to base class.
 
Hello. I'm writing for help. I have an issue related to the inheritance. Have 2 classess: "Spatial" and "Node". I want to assign a Spatial* to Node* in a follow...
[4 replies] Last: Thank you @AbstractionAnon including node.h worked . I should probably... (by luke1985)
May 2014 Pages: 123456... 55
  Archived months: [apr2014] [jun2014]

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