General C++ Programming - September 2008 (Page 10)

undefined reference to function
 
hi all i am new to c++ programming i wrote the following code to : "swap 2 integers using reference variables as arguments in the function" #include<iost...
[2 replies] Last: thanks it worked (by abhikant08)
fstream problems
 
I am trying to read few numbers from text file. struct xy { int x,y; }; xy sod1 ,sod2 ifstream failas; failas.open("sodininkai.txt"); failas >> so...
[1 reply] : array declares an array of length 1. That is, it has just one element... (by helios)
Printing variables
 
I want to print these out but I don't know what to use. I know %s = string, %c = char, %d = dword, %i = integer, etc. But I don't know all of them, could I poss...
[3 replies] Last: char * and related (including PCHAR) are most likely C strings, so you... (by helios)
another C++ input question -- char to int???
 
I'm trying to write a simple console calculator app -- the inner workings of the program are pretty easy, C/C++ will pretty much do the core math work for me......
[10 replies] Last: I like to use this function to text input: char *inputstr(long max... (by helios)
STL and Vectors
 
its been about a year and a half since the last time i did any real c++ programing and could really use some help getting the ball rolling again! I need to f...
[1 reply] : FYI: Don't post your topic in multiple forums. (by firedraco)
invalid conversion from ‘BinaryNode<int>*’ to ‘int’
 
I'm writing a class called BinarySearchTree, and i'm getting strange errors from the compiler at one of the class's methods, and i would like to know why i'm ...
[5 replies] Last: No. That is the whole basis of some peoples' arguments that the aster... (by jsmith)
problem using getline to insert a line in vector
 
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { vector<string> v; str...
[1 reply] : std::cin.ignore(1,'\n'); after cin >>n; . (by helios)
UDP server - client communication
 
Hello. I'm developing a generic UDP server. After creating the socket (SOCK_DGRAM) I call bind and then I start looping with recvfrom function. Inside the lo...
[4 replies] Last: Oh doh, sorry. You could try googling C++ UDP and see what you get, I... (by firedraco)
Flow Control Flushing Annoyance?
 
Hi folks! I came upon this site and was glad to see such a wealth of info. Like many here, I am new to c++ (but not to programming) and experiencing a silly ...
[2 replies] Last: Ah Ha! It's good to have another pair of eyes. Did you ever know th... (by thecriticalpoint)
TXT file got edited
 
Hey guys..i really need your help.Okay,as you can see,in my void Function AddMembers i was trying to store the particulars and info of the person who wish to be...
[8 replies] Last: A big thank you to jpeg and guestgulkan for your help..problem solved!... (by closed account 2A54jE8b)
by xabnu
Moving large amounts of data
 
I know that in stdio.h there is a function 'fread()' for reading a number of bytes from a file directly into an array. Are there any other ways of moving lots o...
[6 replies] Last: Sweet, thanks. That's exactly the sort of thing I was looking for. (by xabnu)
Making a Operating system
 
Can someone help me make the operating system as i am not good with Visual Basic or C++
[17 replies] Last: Sure, but the BASIC "OS" wasn't written in BASIC... For me it was the... (by jsmith)
Output date format from number
 
Hi, I have an assignment to have the user input the date format into YYYYMMDD format, but, I need to output that format onto the screen in Actual Month, Year, E...
[3 replies] Last: You were asking us to tell you how to do your homework. That's why you... (by Zaita)
2D Dynamic array
 
Here is my code that I have written. It is suppose to take values from a .dat file. the first and second value contain the number of rows and columns and the ot...
[1 reply] : You didn't allocate an array of pointers for 'array' to point to. This... (by helios)
Load, sort, and average
 
Hi, I am currently trying to create a program where I input a file called "exp.txt" that contains two columns: 1) date 2) expenses. There are 100 rows. I'd li...
[8 replies] Last: Nope. C++'s >> and << have the same meaning they had in C. For integr... (by helios)
Newbie: Stuck on some Math
 
Hi All I'm new to the forum and new to C. I have an assignment that I am having trouble with. First off what I need to do is re-organize this formula to f...
[5 replies] Last: Mmm, physics 1, good times. That's a beast to do the math. Since yo... (by jpeg)
simiple fix... new to this stuff
 
im new to the C++ language and need a little help with line 15 #include <iostream> void printMagSqrd (int x, int y); int main() { int x,y; ...
[3 replies] Last: I know what the problem was (first version): On line 4 you declared a... (by helios)
programming style
 
Hi all I don't know if this is the best place for this quastion but here it goes. I wrote this "fake" program: #include<stdio.h> int main(){ int i...
[12 replies] Last: default: break; Doesn't make sense to me. Just leave that away. I ... (by jmc)
inFile
 
I am stuck on this program. Just requesting some guidance...a point in the right direction or some useful knowledge. I am trying to create a program that reads ...
[3 replies] Last: It looks to me like the error is related to declaring a vector, but I ... (by Zhuge)
invalid conversion from ‘BinaryNode<int>*’ to ‘int’
 
Helo, the compiler gives strange error messages by one of my classe's methods, and i'm not sure of the cause. template <class T> void BinarySearchTree...
[1 reply] : *_Root=(*_Root)->Parent; (by helios)
September 2008 Pages: 1... 891011
  Archived months: [aug2008] [oct2008]

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