Beginners - August 2015 (Page 5)

Redimensioning of array.
 
Iam just kind of stuck here int basic program of queue, Can anyone help?? class dq { int cap; int front; int rear; int qu ; public: queue(int x) ...
[4 replies] Last: Thanks!! #Mikey_boy it worked ! (by Arya Giri)
by Dazzer
The use of "const"?
 
This from the learncpp website regarding the use of "const": "Normal local variables are subject to local scoping rules, meaning they can only be accessed in t...
[9 replies] Last: const is far more useful than that - const-correctness is most usefu... (by LB)
by chipp
morse code
 
i'm trying to create number to morse converter, but i got weird errors. my code: #include <iostream> #include <limits> int main () { char nums = ...
[12 replies] Last: @andy: thank you so much!!! i've been staring the code tens of times (... (by chipp)
Unresolved Externals
 
I don't see what's wrong with my code... I have declared my functions and gave it definitions, but it still gives me 1 unresolved externals. I've been trying to...
[4 replies] Last: That's because he is not compiling the file. @OP: you need to add gam... (by ne555)
Returning a value.
 
Hi, Can someone have a look at this code please. I am trying to get a function to return a value but it doesn't seem to work. I know i am doing something wro...
[5 replies] Last: Cheers MikeyBoy. In fact while we're on the subject of passing values,... (by HOAX823)
types and template
 
There is something i don't quite understand in the example below. When calling the function are_equal from the main, it is done with an int (10) and a float (...
[1 reply] : Sorry, i figured it out. I may compare float with int. But which one i... (by peterbaaij)
Hash Table
 
How would I be able to store a negative number in hash table? Would it work the similar to how hash for positive numbers are calculated?
[3 replies] Last: I think Duoas is correct. I think negative number gets converted to a ... (by funprogrammer)
by Dazzer
Working with decimal places and one other language thing...........
 
Hi guys, I have two questions about the code below: 1) How do i change the code to display the decimal values correctly? 2) Imagine the exchange rate was exact...
[5 replies] Last: Thanks dude! :) (by Dazzer)
Problem with graph.h
 
I use Dev-C++ 5.11 Im reading Programming Principles and practice using c++. First problem i had was unable to use std_lib_facilities. also Graph.h and Si...
[15 replies] Last: OK, thank you :) (by Parisa)
Learning about new with classes
 
so i just finished learning about copy oonstructor and I'm now learning new and delete. And I'm very puzzled on why people would use a pointer when defining a c...
[3 replies] Last: There are at least three semi-independent topics here. First, the poi... (by keskiverto)
Reading strings into struct causes extra new lines
 
I'm having a hard time with reading data from keyboard and storing it in a struct variable, on a C++ console program. My struct contains data about a book ...
[16 replies] Last: Dear whoever is reporting my posts, you're not accomplishing anything ... (by LB)
just a general question
 
Is it me or do a lot of new programer not comment their programs? Just asking cause when i was doing this in college in the early 90 that was beaten into me to...
[13 replies] Last: I often start with comments that give pseudocode for what I want to do... (by dhayden)
One extra loop when reading struct from file into a vector
 
I have this struct with 2 strings and a long, which I read from keyboard and save into a text file like this: struct libro { string nombre; string genero; ...
[4 replies] Last: Why do they work as a condition on a while loop then? Because stream... (by AbstractionAnon)
by Tzaks
Writing to a file.
 
Hello,i am trying to write a file with input name from the program and then to write in the file something else.. How can i create the file with the extension ....
[2 replies] Last: Thanks for reply but i already read that. If i use like "example.txt" ... (by Tzaks)
Sending file stream to a function.
 
Hello, everyone. I'm new with this type of topic. So I need your help. Suppose I have these two functions- void fo(ofstream& o) { o << " Sarker."; } v...
[4 replies] Last: How little I know! Thanks, however... (by PSYCHAMERON)
ifstream inside a while
 
PLS HELP ME... IS THIS CORRECT.. IT IS POSSIBLE void traverse(void){ node*temp=new node; temp=head; while(temp!=NULL) { string line...
[1 reply] : Don't loop on .eof() or .good() , always loop on the input operatio... (by LB)
sequence of events
 
In what order do these occur when the program "runs": Load time Language implementation time Link time Execution time Run time Compile time
[7 replies] Last: I am an electrical engineer. I am trying to earn a degree in computer... (by MikeyBoy)
If function
 
Why does this not work? I want it to return a text like: Lets play if the request was Play #include <iostream> using namespace std; int main() ...
[2 replies] Last: Also, on line 13, Play has no quotes around it and is therefore not a ... (by shadowmouse)
by sk9294
unexpected output in C program (1,2)
 
I am new to C programming i am learning pointers so i wrote this, i expected the value of c to be 25.345 but it is showing some other big number pls explain... ...
[32 replies] Last: i wrote this in c (by sk9294)
SDL_BlitSurface function
 
For some reason xCode is not finding the SDL_BlitSurface(). I get a build error and the build fails. There must be some reason, I can't figure out what it is ...
[5 replies] Last: I used SDL_GetWindowSurface on line 39. Oh... yes you are :D I didn'... (by Peter87)
August 2015 Pages: 1... 34567... 28
  Archived months: [jul2015] [sep2015]

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