Beginners - May 2014 (Page 2)

Maps and Class Objects
 
I have been having trouble with maps lately. My map has as a key an ip address and as its keyed element an object. When a unique ip is found, a new object is cr...
[1 reply] : I do not have the code on hand, but below is the basic construct. T... (by cire)
Help with Address book program
 
I am working on an assignment for a C++ class and am having some difficulties. The assignment is to create an address book by writing to a text file. The operat...
[no replies]
many errrors for source code and progamming help!
 
Hi, i m having many errors on my work and needs to fix the code below I need to calculate and output the result of the hourly temperatures for each hour of the...
[12 replies] Last: Or you could not use a macro, but a constant. It should be obvious tha... (by ne555)
by Blank
More Cstrings....
 
im not sure what im doing wrong, i thought everything was right until i compiled it. i guess the way im retrieving the user input is incorrect.. please let me k...
[6 replies] Last: very useful and informative! thank you Disch and BHX specter! (by Blank)
by Blank
Help! Cstrings, displaying Cstrings, etc.
 
Pretty much everything is good to go except when displaying the information using a function. please let me know if there are alternatives to making the code be...
[9 replies] Last: I don't understand guys like you who are always reponding in that way... (by closed account 2UD8vCM9)
Big Endian vs Little Endian Char Array
 
Hello, I'm reading a file where some parts of the file are Little Endian and others are Big Endian. I am having no problems reading Big Endian; however, I am h...
[7 replies] Last: Ah, I did some reading and found out that character arrays (8-bit) are... (by MaxterTheTurtle)
Weird output
 
Why is it giving me 2 outputs? #include <iostream> using namespace std; int main() { int sms,ammount; int contract; cout << "How m...
[1 reply] : if (contract = 1){ = is the assignment operator you need the == ... (by Chervil)
the memory allocated depends on what the user enters
 
how to delete the memory pointed by a pointer if the memory allocated depends on what the user inputs: Array::Array (int _length)//the length could be 1! { ...
[3 replies] Last: You would use delete ptr. (by fg109)
virtual methods in abstract classes
 
One thing is confusing me about virtual methods in abstract classes. I don't have much experience with the OOP in C++, so hope you dudes can delete my_doubts; ...
[4 replies] Last: But shouldn't the derived classes inherite all the non-private member... (by Disch)
compare input string to string vector
 
Hello, I wrote a program that reads a list from a file and stores it in a string type vector. Now, I want the user to input a word so that the program can sear...
[3 replies] Last: cire, thanks for the reply. I tried what you suggested and its weird b... (by rxfeliciano)
Don't catch an exception if you don't know how to handle it
 
Is it a good programming practice? I have read many posts about the topic, but nobody gives concrete examples. Let's say that we are trying to catch a bad_allo...
[15 replies] Last: I have understood a possible way of using your methods. Didn't you see... (by closed account jvqpDjzh)
by tdk93
Is the order of prototype declaration and structure declaration in the following program correct?
 
I saw this question from a book Is the order of prototype declaration and structure declaration in the following program correct? #include <stdio.h> ...
[4 replies] Last: #include <stdio.h> struct emp ; // declare emp // *** added *** voi... (by JLBorges)
by tem14b
Expected Unqualified-id error in Xcode
 
Hello! I am very new to code and I also have a mac which made this a little confusing. Anyways, i have fixed all of my errors in this code thus far and I am sti...
[2 replies] Last: That worked, thanks! (by tem14b)
ifstream overflow in while loop
 
Hi Guys, Im stuck on how to break out of this loop when it hits eof(it out puts the last line twice). all the research ive done says to use a break statement...
[4 replies] Last: oh i didnt see that ; that was from when i was messing about with othe... (by MrBeavis)
change class name
 
hi all; What is Function To Change Class Name For(Example:Notepad)?
[8 replies] Last: thanks peter87 :) not CreateWindowEx i use SetWindowTex... (by int man)
by peche
[Warning] unknown escape sequence: '\D' [enabled by default]
 
Thought I had it but now I'm getting an error I don't understand.. Halp! 20 unknown escape sequence: '\D' [enabled by default] #include <iostream> #inc...
[2 replies] Last: Just FYI: Windows core functions accepts forward slash '/' as direct... (by MiiNiPaa)
by Blank
Arrays and functions..please help!
 
so i have tried running my program and i keep getting errors. this is what im trying to do with my program i have to make a program that - uses an array to...
[9 replies] Last: thank you both for all the help! (by Blank)
Question about low level gfx api's (DirectX openGL))
 
I have been messing around now with SDL for about a year. It is decent. There was one thing I was wondering though, when dealing with 2d environments is it alwa...
[1 reply] : EDIT would you instead map the 2d image to poly/quads but only in the ... (by Hambone)
student line up program
 
I am writing a student line up program and for some reason I am getting an error at the following line... string name ; The number should be set...
[3 replies] Last: It is a bubble sort algorithm. You can look it up, since I'm not good... (by fg109)
variable problem?
 
I have a problem with the second and third else if statements. It seems that they're using double air =(feet/1100) which is in the if statement instead of doubl...
[2 replies] Last: Thank you so much Gaius that fixed it! oh ok thanks for explaining t... (by serrld113)
May 2014 Pages: 1234... 55
  Archived months: [apr2014] [jun2014]

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