General C++ Programming - November 2015 (Page 2)

can't find error
 
Where could the error be? I realize this is a small segment of the code but I can't figure out what to do. It says the '.' needs an expected initializer, but I ...
[3 replies] Last: Thanks Chervil! (by closed account 9N36C542)
Initializing "smallest" and "largest" values
 
I have this trivial program I'm writing, and everything seems to work just fine. However, I am bothered by the code I have written for "smallest" and "largest",...
[2 replies] Last: Sounds good. I haven't worked with numeric_limits too much. This seems... (by TinyTertle)
0xC0000005
 
Hi! I'm kind of new to c++ programming but i need to finish something that doesn't seem to work properly. This problem only occurs when i try to fill my array w...
[5 replies] Last: Alright, i've found the solution and the problem was indeed because of... (by jszabolcs)
Old Dr. Dobb's Article
 
http://www.drdobbs.com/a-class-template-for-n-dimensional-gener/184401319 A Class Template for N-Dimensional Generic Resizable Arrays By Giovanni Bavestrelli, D...
[2 replies] Last: Thanks for finding links that work! (I confess that I did not see tha... (by kevinkjt2000)
Two consoles sharing and passing data
 
Here is an example of what I'm trying to do... Console 1 - cout << "please enter your name" << endl; Console 1 - cin >> name; Console 2 - cout << "name" <<...
[5 replies] Last: > How can I do this with a visual studio cmd console program? Create ... (by JLBorges)
Why isn't type& treated as a single token?
 
This is a why does the language work this way question, but I've just spent an extremely stressful day trying to find a problem and it turned out that I had dec...
[1 reply] : > Seeing as C++ treats int& and int as different types, why isn't the ... (by JLBorges)
comparing user input with txt file without using string
 
I am in trouble to comparing user input with the content in txt file. let say I have a txt file line1: username1 line2: pw1 line3: username2 line4: pw2 t...
[3 replies] Last: if (un == username && pw == password) You have to use the function ... (by Thomas1965)
by Geeka
scientific calculator with functions...
 
I need help figuring out how to use a while loop or an array to not only use two number but mutiple number if neccesary or wanted in the calculations.. //This...
[no replies]
by Geeka
error: expected '}' at end of input
 
So my program is to design a calculator.. Im doing it little little because it's alot... When running i get this error saying error: expected '}' at end of inpu...
[2 replies] Last: There are two int main() functions. That can't be done. Other than tha... (by EverGreen1231)
by nct
linear interpolation method
 
i have a text file having two columns heading "z","p","v","w","av","aw" containing numeric values.So i want a program to store these values in two different ar...
[6 replies] Last: Multiple posts are bad. http://www.cplusplus.com/forum/beginner/17986... (by closed account 48T7M4Gy)
Can't access the same Class data in different classes
 
I want to use the same airport class named 'air' which is defined in main() in different classes. But I don't know why when I try to call the print function in...
[1 reply] : it failed to access the data in 'air'. Failed in what way? Error m... (by Thomas1965)
by ay2306
Read and Implement code from a dat or text file
 
Hey guys, I am making a program. For that now i am thinking of making a backup. Which is simple that i write all the data from code form in a .dat or .txt file....
[8 replies] Last: Thanks YFGHNG for the explanation, I've been tied up with other things... (by closed account 48T7M4Gy)
recursion
 
Do you understand recursion? Would you like to help me understand recursion? I have 3 questions about this procedure: void Show_Tree(node * ptr_to_tree) ...
[2 replies] Last: Pointing to memory location 0 doesn't necessarily mean that there's no... (by YFGHNG)
array of even numbers
 
hi guys, my program displays a set of even numbers ranging from 1 to 100 with their square roots, cubes and reciprocals. pls i need a source code for comparison...
[7 replies] Last: If @OP has learned about function prototyping, it would be exactly as ... (by YFGHNG)
[Help] Temproralily reduce mouse speed while it see pixels
 
Hello guys, I would like to create programm which will temproralily reduce mouse speed while it see pixels on the center of desktop. What can I do?
[no replies]
Arrays from text file
 
How do i store double/integer from a text file into an array. I have used two columns one is the time and the other is amplitude, they both have 361 rows of dou...
[2 replies] Last: #include <fstream> int main () { std::ifstream ifs ("amplitudes.... (by closed account oGN8b7Xj)
Not sure why code is broken
 
For some reason I keep getting not in scope errors and i'm unsure on how to fix them #include <iostream> #include <string> #include <sstream> #includ...
[1 reply] : Lots of problems with this... //Counting Yes and No for Amendment 1 ... (by SamuelAdams)
by e7kim
square pattern problem
 
How do I generate a square pattern below given a parameter N (possibly using if statements)? I've been cracking my head over this problem for a week now, to no ...
[no replies]
by caffy
Need help starting this program.
 
Hi, I need to write a program that does calculates the floor area in a house for carpeting material. It must do the following. 1) Asks for the number o...
[2 replies] Last: I would do: class Room { public: Room ( const double& _dHeigh... (by closed account oGN8b7Xj)
Stuck on Project "Pirate Election"
 
Hey guys, I am supposed to write a program that uses different functions to accomplish a main task. Below is the task assigned for better understanding -------...
[no replies]
November 2015 Pages: 1234... 26
  Archived months: [oct2015] [dec2015]

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