General C++ Programming - January 2014

+help+ writing to .txt file, trouble with format
 
Question: So I want to send and store: words, their definition, synonyms, and part of speech, in a .txt file and later be able to recall and use the words acco...
[2 replies] Last: So you're suggesting to print in format I want write something like, ... (by MattTuck)
ERROR Copying array- pointers
 
I was trying to copy one array to another one of the same size, but when I execute the program all the array values that are supposed to be copied appeared to b...
[1 reply] : See an answer in your first post in the "Beginners" forum. (by kooth)
Adding intrest
 
In my Computer science class we need to create a program that looks like this. http://pho.to/4esUH I am confused as to why the interest rate raises 0.02 the...
[2 replies] Last: You will want to use separate variables for your interest rate from ... (by David Nuttall)
by Ceset
SFML Game Development book example game
 
Hi everyone In game.h ResourceHolder<Textures::ID, sf::Texture> mTextures; I keep this file and ResourceHolder is a class which mainly focused on keeping th...
[4 replies] Last: Like i said i am working from SFML Game Development book but it does ... (by cire)
vectors
 
Can we compare vectors with linked lists?
[4 replies] Last: thanks!! @Peter87 and Disch. (by NPcomplete)
C++ forum renaissance!
 
During school, I didn't have class. I needed to be doing something educational. I felt creative so I opened a good ol' C++ compiler when *BAM!* What do I write?...
[6 replies] Last: That was awesome @Disch !! (by NPcomplete)
Access List<int> elements and size
 
Hi, I wrote this piece of code, basically, it is a vector of lists. But, I can't see why I'm not able do access the elements that I added into list and its s...
[7 replies] Last: Ok, unsderstood. But, how will I do a vector of vectors dynamically? ... (by NeoKratox)
Is this syntatically legal and will it do what I want?
 
I am in the steps of writing a game, and I'm not sure how to go about loading images. Would this be syntactically correct? A portion of my code: class load...
[8 replies] Last: That is cleaner & better. (by jsbrowndog2013)
Inheritence question
 
Hi, I began studying Inheritence and would like to ask a basic design question. I want to create a base class shape that will have the following methods: 1...
[15 replies] Last: Hi L B Thank you very much! You made it awesomely clear :)... (by jared11)
g++: command not found
 
Hi. I am getting started with Unix programming, but I am having difficulty compiling my programs. I have .cpp files, which I try to use the g++ command on. Howe...
[5 replies] Last: Roberts-MacBook-Pro-2:~ drinkibird$ Looks like local machines promp... (by keskiverto)
Should I Use OpenGL Or DirectX? (1,2)
 
Greetings, After much research, I still haven't picked my choice in the treacherous question "Should I use OpenGL or DirectX?". My two friends and I are maki...
[27 replies] Last: I agree with most of the conversation going on here. Either learn both... (by TwilightSpectre)
by vinbad
debug error
 
I am writing a code to read a file and break it into lines and characters but I am getting an error do not know the reason for it though. here is my code ...
[1 reply] : http://www.cplusplus.com/forum/general/112111/ char *a=new char(lin... (by ne555)
PLZ Help about interest calculator code
 
In Netbeans, create a new project (called, for example, "homework02"), for this assignment. Do not use spaces in the name. Follow the same process as you did in...
[3 replies] Last: I would normally be the first to jump at helping, but I've grown tired... (by BHX)
Making games with C++
 
Hi. If you were to make games with C++, how would you go about doing that? I saw something called allegro, but i dont know. Is there any good alternatives li...
[3 replies] Last: I cannot disagree more. Both SDL and SFML out of the box are useable. (by Avilius)
Error stack around the variable was corrupted
 
I have one problem with my code it's working until end of this program and program show this error: Run-Time check failure #2 - Stack around the variable 'Obsd"...
[1 reply] : On line 25 you copy 100 bytes but Obsds is only sizeof(SDats) bytes. (by Peter87)
by Chubby
error on overload function
 
when i run this part of code i got llbd on xcode plus some random number... Cna someone help me out by point out what is wrong with code int getValue() {...
[7 replies] Last: Eh, I don't think that's what parameters are meant for. If you really... (by long double main)
Sorry for asking all these pointer questions :P but...
 
Is this correct? class exampleClass { public: exampleClass(); type * returnAPointer(); //pretend type is an object/datatype private: type Pointer; }; ... type...
[5 replies] Last: Yes... that would be syntactically legal. However... again... when de... (by Disch)
error LNK2005 - already defined
 
hello, I know this error has been published many times but I couldn't find a solution to mine. I have 4 files: def.h mms.h mms.cpp runMms.cpp In th...
[5 replies] Last: Are you using #ifndef, #define, & #endif?? If not, it could be redefin... (by puredesi5)
Exception Handling
 
Why is exception handling needed? For example, if my function divides two numbers and returns quotient, I can check for value of b before I divide to ensure it'...
[2 replies] Last: Your function is returning a value of type double to the caller. What ... (by Cubbi)
Another making a class problem
 
So I've been turning my programs into classes and I run into errors. So this program is supposed to allow the user to open the file and either read or ...
[10 replies] Last: you never opened the file also you wan't the string header file not cs... (by Yanson)
January 2014 Pages: 123... 25
  Archived months: [dec2013] [feb2014]

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