General C++ Programming - February 2012 (Page 6)

by Nikhar
Binary Search tree
 
While it is true that the inorder traversal of a binary search tree produces a sorted output, is the converse also true, i.e., if the inorder traversal of a bin...
[4 replies] Last: Oh...thanks a lot. No, it wasn't messy. It was great. Thanks again. :) (by Nikhar)
Simple logic but getting errors?
 
The goal is to print N to N1 in descending order. I've did this b4 but now i'm getting runtime errors.. #include <iostream> using namespace std; int mai...
[3 replies] Last: Your code demonstrates that sometimes it is better to use for loop ins... (by vlad from moscow)
Hourly automatic initialization
 
Hey you all!!... Im here again :) I need a method to run the program at 8:00am and every half hour run a function (in Linux), example: #include <iostream> #i...
[5 replies] Last: Well, finally is solved, to control that does not consume 100% CPU, I ... (by MacGregor)
Getting wrong answer !
 
Here's the question :- Problem 1: Book Sorting, (K Narayan Kumar, CMI) Indraneel has to sort the books in his library. His library has one long shelf. His bo...
[13 replies] Last: Thanks a lot ne555 , maybe you are correct but then why is it so that ... (by Maggi Iggam)
Locating file
 
Hi, I would like to seek some help in locating the file. Please help as it is urgent for project assignment. string line; ifstream dataList ("fileData\fil...
[2 replies] Last: Thanks! :D (by Joyce Lim)
by cdalto
Issue Calling a Member Function
 
Basically, I have a class defined as such: class StudentType { public: StudentType(); void getData(std::ifstream & fin); void computeAverage...
[2 replies] Last: I exited Terminal and started a new session. That seemed to fix the p... (by cdalto)
by Smitty
Using setprecision
 
This is the final line of my code. cout<<"Resultant Force vector in Newtons and Cartesian form: "<<fixed<<setprecision(.1)<<pointSum <<"i "<<pointSum <<"j "...
[1 reply] : See http://cplusplus.com/reference/iostream/manipulators/setprecision/... (by hamsterman)
by cdalto
Expected Primary-Expression Before ‘]’ Token
 
Hello, I keep getting this error while trying to compile. The error occurs in lines 27, 28, and 29. Is something syntactically wrong? #include <iostream...
[2 replies] Last: That fixed it! Thanks. (by cdalto)
by Aikon
foo function
 
Stupid question: I found the testing foo function everywhere. What it means?
[3 replies] Last: ESR's 'The New Hacker's Dictionary' (aka The Jargon File) Version 4.2.... (by JLBorges)
How to use this ifstream?
 
I have a constructor which takes in a reference variable of type ifstream. I want to be able to define a file which to get one line of text from and then use th...
[4 replies] Last: Thanks so much. I can't believe I didn't figure that out. I feel like ... (by hopesfall)
Class in a Class !?!
 
Hello. While reading a header file for an open source project I noticed something that puzzled me. Before the declaration of a class and after the includes the...
[5 replies] Last: I see the point of it now. Thanks again. (by JMatt456)
What IDE should I use?
 
I am currently using Dev as my IDE, and I realize that it is supposed to be terrible for numerous reasons. Due to this fact I would like to start using a differ...
[14 replies] Last: If you want a customizable IDE that you can plug in multiple compiler... (by Moschops)
by Aikon
Inheritance
 
Like in java all classes are inheritanced to the class Object. There is something like this in C++? THX
[1 reply] : No. There is no base 'object' class in C++. (by quirkyusername)
Reading A CSV
 
I am having trouble reading in values from a csv file. I take the values in as strings and convert to ints. The issue I am having is that I keep falling into an...
[2 replies] Last: First one is working! Thanks a mill :) (by jpphelan)
Inline Asm
 
Correct me if I'm wrong, but I believe its possible to load executable data from a file and execute it through a jmp instruction using inline asm. Assuming that...
[6 replies] Last: @roberts, Your definition of ADT is uselessly strict. Both SS and std:... (by hamsterman)
Lookign for a good OpenGL tutorial
 
I am looking for a good OpenGL tutorial. I do not want to use GLUT or GLEW as extentions. Just plain old OpenGL tutorial. I use Dev C++ 5.0 Beta as a compile...
[2 replies] Last: Just took a quick glance, but the one ModShop suggested seems to actua... (by hanst99)
User Interface help..
 
#include <windows.h> #include <stdio.h> #include <conio.h> #include "dynamixel.h" #include<time.h> #pragma comment(lib, "dynamixel.lib") // Control...
[no replies]
HELP ME WITH THIS PLEASE, MY PROJECT! '::main' must return 'int' error
 
#include<iostream> #include<cmath> using namespace std; void main() { int code, qty, cash; double tDue, change; cout<<"\t\t\tWelcome to DuaNetopi...
[1 reply] : You have two major problems: 1. You are using void main() . You sho... (by Stewbond)
Code Emulator Help?
 
I'm trying to create a program that runs other programs for me, and closes them if they begin to fail, run into an infinite loop, or meet an error, without endi...
[2 replies] Last: Alright, thanks hanst99. I guess I'll just put it in my impossible fol... (by Shay9999)
Countdown...
 
I Got My Code Up And Running The Way I Want, Only Thing I Want To Know Is How Do I Make The Counter Count TO The Number Imputed Instead Of Counting FROM The Num...
[1 reply] : @Memo Gonzalez Your mod_test check didn't work as you wanted. Here is... (by whitenite1)
February 2012 Pages: 1... 45678... 43
  Archived months: [jan2012] [mar2012]

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