Beginners - June 2014 (Page 47)

getline not working?
 
Hello again gents, Im at my wits end, My program is designed to search through a .mp3 file find the id3v1.1 information, output it to console and then offer th...
[5 replies] Last: Keeping things simple.. As you know, cin waits for the user to ente... (by Codermik)
Can't understand this... (logic problem?)
 
On my prog class we had this problem: user 1 have 1.10 height user 2 have 1.40 height user 1 have 0.30 grow rate per year user 2 have 0.15 grow rate per yea...
[8 replies] Last: Thnx, Chervil and Peter87. You helped me a lot to understand floating ... (by rodrigo1984)
How about pointer scope in funtion?
 
void functionA() { int *p = new int; } void functionB() { int *p = new int; } Is "p" in functionA point to the same address on "p" in function...
[4 replies] Last: Is there any chance for pointer to point to the same address? Th... (by AbstractionAnon)
WriteProgram for emulator
 
I have just finished writing my WriteProgamV2() Version 2 accepts a syntax similar to Assembly language and then converts the words into bytecode instruction...
[17 replies] Last: That Map keyword looks interesting, you are able to assign strings to... (by Disch)
Need help with datafiles !
 
I was writing a program for validating username and password from a datafile. However, the program stops working as soon as I press enter after entering the pas...
[no replies]
one array equal another (rpg game map)
 
so i am working on a roguelike rpg game and i have all the "stuff" in the game figured out like fishing fighting what ever. all except for moving from map to ma...
[2 replies] Last: Firstly char Level_Map; // <-- this is a variable that contains a sin... (by CodeGoggles)
by tdk93
how does getchar() know that enter has been pressed?
 
The following program copies the input to output. main() { int c; c = getchar(); while(c != EOF){ putchar(); c = getchar(); } } ...
[1 reply] : It doesn't, directly. A newline is just a character like any other. ... (by keskiverto)
cpycstr
 
Why does this work? char* cpycstr(char* to, const char* from) { while(*to++ = *from++);//it seems that to is resized, without having to reallocate ret...
[1 reply] : It doesn't work. You are free to corrupt random memory locations just... (by keskiverto)
by yakov
overload "<<" iterator (using by Vector)
 
Hello. First, hellow, i'm a new hare. Second, my english is not perfect so i'm apology for spelling mistakes. Third, hare is my cuation: I'm trying to o...
[4 replies] Last: Solution for your problems is to use public Vector interface: say, ope... (by MiiNiPaa)
Referencing a function
 
Hello. Can someone help me understand this. If i have a fnction like this string& Basic_Functions::printval(std::string &str){ return str; ...
[4 replies] Last: I see.. Thanks for the explanation and the example (by skadush)
2D array and writing to a console.
 
Hey everyone. So I am attempting to program some form of basic ASCII game in C++ just to learn more of the basics. I have most of the fine details of how the...
[2 replies] Last: Ok, I think I understood what you were trying to tell me. The main di... (by Jebster)
by Auroch
Displaying difference of vectors
 
Hi everybody! I'm trying to display the result of difference of two-dimensional vectors using friend overloading. Builder shows the following error after compi...
[4 replies] Last: OK. (by Auroch)
troubles with gtk+
 
Hello everyone, i'm using gtk+ for the first time, but the first project i created is not working it kept giving me an error that i can't really figure out how ...
[1 reply] : What error? (by Lachlan Easton)
Where to?
 
Hello everyone! I hope i am posting in the correct section this seems right but my apologies if it is not. I recently started doing c++ after doing pretty simpl...
[4 replies] Last: Hello, thank you for the reply. For my last and final question would a... (by lazsers)
Trouble allocating new node
 
We have an assignment where we need to model two data structures that sort a given data set by name and by type, but cannot allow data duplication. One of the ...
[2 replies] Last: Line 14 is a problem. content points to some random place in memor... (by cire)
bad_alloc vs nothrow
 
I am writing my String class, just to practice, but I would like to create something at least not bad. I am using pointers (C-Strings) to internally represent t...
[2 replies] Last: > what should I use the nothrow new version or the bad_alloc one? Use... (by JLBorges)
Structure initialization not allowed?
 
Can anyone help me out with this code? Why can't I initialize a value for the arrays in a structure? struct car { const static int price ;...
[7 replies] Last: Article on separate compilation: http://www.informit.com/articles/arti... (by JLBorges)
read from file
 
Hi, how can i read data from a file ? Thanks
[5 replies] Last: What do you mean friend function declarations? Also I'm confused the ... (by closed account 2UD8vCM9)
Greatest/Lowest
 
Hello everyone, I need to input 3 numbers and find the greatest/lowest number using if statements. So far I have: #include <iostream> int main() { int n1; in...
[3 replies] Last: Right to left, not left to right... (by spamtrain14)
Problem with Entering String Data into a Node
 
Write your question here. I am trying to enter string data into a struct Node but the program bombs. I suspect it is line 60 causing the crash. Why so? ...
[2 replies] Last: Made the change. Found another bug. Corrected it. Program works. N... (by phztfte1)
June 2014 Pages: 1... 45464748
  Archived months: [may2014] [jul2014]

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