General C++ Programming - September 2012

by ALG042
Load array from text file using dynamic memory allocation
 
I am pretty new to c++, and I am having some trouble trying to read a text file into a 2D array using dynamic memory allocation. I have been doing plenty of "g...
[7 replies] Last: Thank you so much for your help ... I really appreciate it!! :)) (by ALG042)
HELP PLEASE!!!
 
Ok, so I need to write the following functions, a) int first_digit (int n), returning the first digit of the argument b) int last_digit (int n), returning the...
[3 replies] Last: What is completely different? Here and there the same function that re... (by vlad from moscow)
Boost::filesystem Searching... (1,2)
 
Could someone please explain how I can use the boost library to search for a directory and/or file in any directory? How am I supposed to use an iterator? W...
[21 replies] Last: In windows, on my system, my program would crash when I attempted to i... (by htirwin)
by ozza
How safe is this?
 
Hey I'm making a program that saves some files, so that it can read from them later. I made a directory in C:\Windows in which to save these files. Is it safe t...
[5 replies] Last: I've added a function into my program where users can install it, whic... (by ozza)
Return funtion
 
#include <iostream> using namespace std ; int calcArea( int , int ) ; void display ( void ) ; int main () { int length , width , area ; cout << "...
[2 replies] Last: Here you are returning constant character string from the function whi... (by upX86)
How to make a chat bot for MSN
 
I'd like to create a bot that does the following: - Connect to MSN with an account - Reply to common IMs like "Hello" How do I go about doing this? I ha...
[no replies]
repeat reading of last data
 
#include<iostream.h> #include<conio.h> #include<string.h> #include<fstream.h> #include<process.h> //for exit(0) #include<stdio.h> struct student { clr...
[2 replies] Last: thanks peter87 (by niksri4)
by mono
Iterators?
 
I am confused. What is exactly an iterator? and what it is use for? I know that there is 5 kinds of iterators: input, output, forward, bidirectional and random...
[3 replies] Last: A very good introduction to iterators in C++: 'http://www.mochima.com... (by JLBorges)
payroll report
 
// Includes #include "stdafx.h" #include <iostream> #include <conio.h> using namespace std; // Main Function int main() { cout << "This will displ...
[2 replies] Last: ok thank you (by Reaper1)
Help with connecting C++ and MySQL
 
I need to run a query in MySQL with C++ input. So far I've written this code: int E1, Ei; string sqlquery; string sqlquery2; string query; cout...
[3 replies] Last: Well, I actually just learned programming. :) Is there a shorter way ... (by MirzaAdrian)
Numeric problems
 
Hi, Note: The question is basically what i've written at the bottom of this text, everything above "Long story short" is just a bit of background informati...
[10 replies] Last: > Constructing a float, double, long double or custom data type with t... (by JLBorges)
Binary Tree
 
Can someone please see whats the matter. The search function is not working. #include<iostream> using namespace std; const unsigned size = 6; struct Tree { ...
[3 replies] Last: Oh lol sorry you did post the problem you said the search function was... (by Reaper1)
arrowhead program
 
// Includes #include "stdafx.h" #include <iostream> #include <conio.h> using namespace std; // Main Function int main() { int x; int y; cout...
[11 replies] Last: thank you raman009, that was alot of help, at last i got it, i made th... (by Reaper1)
file handling
 
the program is not compiling &&& showing only a single error that i couldn't understood.have seen the code many times but i couldn't found the error........ pLz...
[8 replies] Last: 0'shit !!!thnxs mAn ................. :)@aramila !!!! (by biLmLik)
by Pludge
Help with bubble sort
 
Hi. I am dealing with an assignment that requires me to have Bubblesort perform a few tasks. original unsorted data data sorted (ascending) data sorted (des...
[3 replies] Last: Delete comma on void Bubblesort2 (int ulist , int slistr , int n);... (by andyoucantoo)
Pre and post increment
 
void main() { int a=1; printf("%d %d %d",a,++a,a++); } How come the output is 3 3 1.Shouldn't the output of the pgm be 2 2 1? Please help me with ...
[6 replies] Last: It means that literally anything at all can happen. http://www.catb... (by helios)
I need help with the calculation part of this program urgently i am new to c++
 
#include <iostream> #include<string> using namespace std; int main() { //variables// string Gender = ""; string Activitylevel = ""; double Weight = ...
[1 reply] : Hi ! Use code tags please. I notice that this early: if(Gender == "m... (by soranz)
by twicey
program using array need to find the position of the number
 
please take a look at my current work. thanks #include <iostream> using namespace std; int main() { int position, innum, n, i, a ; cout << "Please ...
[3 replies] Last: //from line 16 cin >> innum; for(int i=0; i<n; i++) { if(a == inn... (by soranz)
Adding too many includes
 
I have many individual classes for components. Some are Buttons some are Windows and so on. Each class has a function to render its own self on its own private ...
[3 replies] Last: It's difficult to say. Design decisions are never "once size fits all... (by Disch)
Template chrono problem
 
I have the following problem. I attempt a timer using "chrono" attribute-based templates. The problem is that when splitting into classes in separate files. ...
[3 replies] Last: Yes, that works too, but it's not too different from just moving the d... (by helios)
September 2012 Pages: 123... 32
  Archived months: [aug2012] [oct2012]

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