Beginners - April 2014 (Page 13)

Multiple Header and Source Files
 
What is the advantage of separating code into multiple header and source files? Other than organization, why not put all declarations into one massive header...
[3 replies] Last: The main advantages of spreading a program across several files are: ... (by angiemailo)
Base Class And Derived Class
 
So I'm starting to learn simple inheritance with classes can someone clarify if my view on base class and derved class are correct So this is what I think ...
[11 replies] Last: A class that was created based on a previously existing class (i.e., ... (by angiemailo)
by al3ks
Can I use a pointer to change data saved at a memory location?
 
Hi I am new to C++ and I'm trying to understand pointers. I have researched and understood the general idea, what they are and how to use them etc. My que...
[3 replies] Last: Thank you! Just wanted to clarify as I wasn't sure If I undersood it r... (by al3ks)
Opening a file and using a structure
 
I am pretty dang stumped on this question..... Create a file containing the following: car numbers, miles driven, and gallons of gas used in each car (do...
[2 replies] Last: right after the while(file.good()) ? (by REGNETAM)
Question about global variables
 
I always see people advising against the use of global variables; since I'm a beginner, I haven't experienced the downfalls yet. Is it common to use global c...
[6 replies] Last: Ah I see. Than you for the tip Lachlan Easton. I will keep naming conv... (by fryingpan)
Help with arrays and structures
 
I need help with structures. my problem is taking 8 numbers if one of them is negative displaying "DQ" else removing the smallest 2 numbers and then calculating...
[no replies]
by binnet
finding entered word number in entered sentence
 
hello. i need a help with my program. i have to input a sentence then a word. my program should find the number of entered word in sentence: for example : i lo...
[3 replies] Last: int main (void){ char sentence ; char iteration ; int coun... (by angiemailo)
CSC-138
 
Please I need help this questions 1. What is the difference between a (binary) operator and a function? 2. Is it possible using operator overloading to cha...
[10 replies] Last: Pointers are objects that point to a block of memory. They can be usef... (by giblit)
printing out doubly linked list
 
I am trying to have my linked list's ostream print out the previous node's location, then value of the current node, and then next node location but right now i...
[2 replies] Last: you're right, i was focused on the ostreams when i was not setting the... (by pepstein)
by rshoe
Bytes of stored words.
 
I have a char array with three words and I am trying to find out how many bytes are necessary to store the actual 3 words of data stored in the array. If anyone...
[3 replies] Last: Thanks everyone for your information. This helps me a lot. Thanks! r. (by rshoe)
Can't enter data in variable
 
This is the full program code. Its still unfinished but if I choose option 1 and enter the names. It goes to keepGoing function but it won't let me enter Y or N...
[8 replies] Last: mannn! Now I gotta re-rewrite my program. Thanks for the help guys. (by musicman74)
Ascii Characters in Overload Need Different Colors
 
I am including a small snippet from a program that was put together recently. I would like to finish it with color to the ascii characters I have included in th...
[4 replies] Last: Very nice nvrmnd, this works! Thank you! In regards to what the... (by carpalTunnel)
About API
 
API(application programming interface) what should we know before jump to learn about API? and after we know of how to create our own API what can we do with i...
[1 reply] : Your understanding of the topic is a bit off. API is a very general te... (by JockX)
Help with Structures
 
Hey everyone I need help with structures. In particular this problem I am having. I'm working on a project where take an in_file and compute the average and dis...
[1 reply] : I have looked at my errors and improved the code. #include <iostrea... (by JoeMurda)
Errors Across Multiple .cpp/ & .h files.
 
How can I fix my code based on these errors popping up when trying to run the program? Thank you. 1> Sorts.cpp 1> Source.obj : error LNK2005: "int * defa...
[16 replies] Last: @Abstraction WOW. Haha Look at insertion sort. I had a j++ when it nee... (by sportstool)
Compare statement not working
 
I'm trying to relearn c++, but seems like I have forgotten a lot. Can anyone tell me why this compare statement is not working. When Ps2 is equal to 13.4701 it...
[4 replies] Last: I tried 10 as well and they compare, but it never came out of the loop... (by brokeas)
neat little program has global variables, what is alternative
 
I wrote this neat little program that has global variables in it. I have been told never to use global variables. Or atleast that any time you do there is a bet...
[2 replies] Last: thanks for the reply. i will look into those things. (by MarketAnarchist)
by Tanhua
Reading txt and printing wanted value
 
Hey, I have small problem.. How I can read/print only wanted line/value from file? At the moment when I run it.. it prints whole file (cause of EOF yes) but cou...
[3 replies] Last: Thank you very much! You saved my day (and coffee).. :) Works like I ... (by Tanhua)
by Ionos
Maze
 
Hello guys!I have a problem with my code(maze solver) so i need your help. I have to solve a maze(2d grid) with dfs.I m not going to release the whole program ...
[3 replies] Last: mutexe : string path hold the direction that follow the robot ( 'LEFT'... (by Ionos)
Bubble Sorting Code Not Outputting As Desired
 
Hello, below is my code that currently runs. However, it is outputting just "Bubble Sorter" and nothing else. What is wrong with my code? Thank you! ...
[12 replies] Last: I'm not sure why the old put-main-first method persists so much -- it ... (by Duthomhas)
April 2014 Pages: 1... 1112131415... 67
  Archived months: [mar2014] [may2014]

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