49,761 Topics

Member Avatar for
Member Avatar for hanimzainal

I've homework to complete. but unable to finished due to I'm did not have the idea on how to read from a txt file and write back on it. what I've complete is just entering data via cout and cin. i know that i need to use the fstream and …

Member Avatar for Nick Evan
0
148
Member Avatar for termatt56

I've just read chapter 8 of accelerated C++, which covers template functions. From my understanding if you use a template in a function that function must be included in the header file, as opposed to a source file. Am I correct in thinking this or am I missing something obvious?

Member Avatar for termatt56
0
107
Member Avatar for ELBUF

I am writing my program for the bullseye dartboard question I posted in another thread. The link is [URL="http://www.daniweb.com/forums/thread255853.html"]here[/URL]. Anyways once I debug, it brings up 2 errors that read: LNK2019 Error: unresolved external symbol _main referenced in function _tmainCRTStartup and the file is MSVCRTD.lib and the other error is: …

Member Avatar for ELBUF
0
234
Member Avatar for Skeen

So I'm working on this class, which is basically to wrap a char into 8bools, and it works so far, however I'm running into a problem, in the dedication of values, since I'm to use the overloaded array operator, as well as the overloaded assignment operator, at once, however I …

Member Avatar for dusktreader
0
129
Member Avatar for richman0829

Restarting C++ class after lengthy break, seems I've forgotten a lot. I can't seem to get a cout to indicate that a file record has been read. I created a text file of just one record to keep it simple: an SS number, first and last names, and five exam …

Member Avatar for richman0829
0
261
Member Avatar for faaz

I am trying to do this C++ homework, my second one, i am very new to this and have no idea what is going on i would appreciate any help. thank you. below is the homework problem and what i have so far. i know that i need to create …

Member Avatar for dusktreader
0
2K
Member Avatar for Skeen

So I've been working on two small programs to calculate prime numbers, fast and memory efficiently. Both my algorithms are based upon the 'Sieve of Eratosthenes', and I know that the 'Sieve of Atkin' would be the way to go since its faster, however I'm just trying to optimize the …

0
87
Member Avatar for Frederick2

Does anyone know if there are any issues in using the basic ODBC Api for database access on 64 bit Windows Vista/7 systems? This has been my preferred database access technology for a long time, and I'd prefer not moving to ADO or something else if I don't have to. …

Member Avatar for Frederick2
0
158
Member Avatar for wolfkrug

So I am trying to compile this program, and I know that the only problem with my code has to do with the "while" section of the do while loop, either that or something to do with those variables. I declared the variable "repeat" as a char, and prompted the …

Member Avatar for Fbody
0
128
Member Avatar for dardar4

hi all. i need to work with CvFitLine , but i can't find any examples of what it does. basically i need to take a set of points (lets' say 3) , draw a line between them, and than i need for every point sum the distance of the point …

Member Avatar for dusktreader
0
114
Member Avatar for Skeen

So I'm working with OpenGL, and DevIL to load some JPEG into my program, and I've had some trouble, I've isolated the program in a simple sample program (uploaded), the program is, that when I load the standard file, that came with the guide ("Geeks3D.jpg") it loades instantly and runs …

Member Avatar for Skeen
0
107
Member Avatar for dps

I want to select 5 points set from n given points one by one exhaustively. In other words i want to do nC5 in c++ but not getting a simple way to do it. Please tell me any solution.

Member Avatar for dusktreader
0
97
Member Avatar for gingerx

hi, can somebody please tell me what would be the problem that it couldn't open the file? i compiled it in dev c++ and it gives me no error. the file 512.dat is in the same directory. [CODE]#include<iostream> #include<fstream> #include<stdlib.h> #include<stdio.h> const int sc = 768; int main() { int …

Member Avatar for gingerx
0
1K
Member Avatar for ilyaz

I need to develop a C++ DLL in a legacy system, so I have to work with Visual Studio 6.0. The project I am working with was copied from a "template" project that someone created a long time ago. I copied it, made lots of changes then realized I also …

Member Avatar for Ancient Dragon
0
198
Member Avatar for green_leav

Hello everyone....this time a have a competition program that I want ur help but this time i just want from u answers to some problems that i faced when i was working on it : this is the program: Mail merge is a software function describing the production of multiple …

-2
80
Member Avatar for atticusr5

hey everyone, so im trying hard to get this assignment done by tomorrow but after sucessfully compiling, I am now getting linker errors. I have to use Vi for this assignment but never the less here are my linker errors: assign5.o: In function `main': assign5.cpp:(.text+0x1026): undefined reference to `Print(cStudent (&) …

Member Avatar for jonsca
0
73
Member Avatar for atticusr5

Hey everyone, I am writing a program for my c++ class to take student records and organize them according to the students last name. All data is stored to a class and I have created an array of class objects(its part of the assignment). I am using Vi to compile …

Member Avatar for atticusr5
0
113
Member Avatar for Frederick2

It seems even if I place #define _CRT_SECURE_NO_WARNINGS at the top of my C++ source files, if the warning level is set to 3 or 4 I still get all the warnings. Is this the way it is supposed to be? I like to have my warning levels set fairly …

Member Avatar for Frederick2
0
492
Member Avatar for nerdinator

I need help with running two function at the same time . MultiThreading? [CODE]void Function1(int n) { while(n<10) { n++; } } [/CODE] [CODE]void Function2(int n) { while(n<20) { n++; } }[/CODE] If these are the 2 functions,can someone tell me how I can start the 2 together [B][U]from int …

Member Avatar for nerdinator
0
93
Member Avatar for sblass92

Hey everyone, Browsed through the forums and a C++ book, but can't find what I'm doing wrong. 1)Goal is to pass colors array to a function that picks a color set from 19 options and modifies red, green, and blue to be used in an allegro function. Each color set …

Member Avatar for sblass92
0
765
Member Avatar for Clawsy

Hello, I just started reading and learning DirectX SDK's tutorials in order to develop skills for game programming. I don't know COM very well (i just start learning it). I read lights, materials, mesh and BasicHLSL DirectX9 tutorials (line by line). I know C++ and math (not VERY good math …

Member Avatar for EuroK44
-1
228
Member Avatar for RobBobSmith

Hello all: I am quite new to C++; so far I have used it for finance-related database management. I need to incorporate code for solving an algebraic problem and I am stuck on how to write the code. I would be grateful for any assistance! The problem I want to …

Member Avatar for Fbody
0
164
Member Avatar for malionette

I'm having a bit of trouble getting string input while i'm in a function. I was wondering how I could input a really long string (about the size of a paragraph). cin >> entryA seems to work, but only with 1 word. Any more and it starts looping getline(cin, entryA); …

Member Avatar for malionette
0
210
Member Avatar for falcon60

Hello! I'm beginning learning C++ and I was wondering, does Visual Studio 6.0 support all of the language features or is it too outdated now? If so are there any free compilers/linkers that I can use for windows programming? I'm also worried about the windows API headers being outdated as …

Member Avatar for falcon60
0
86
Member Avatar for LemonLemon

I want the extract the two values(113.654321 and 114.654321) from the CString CString sValue = "113.123456 114.654321"; I tried to use the TrimLeft function of the CString Class, which is sNewValue1=svalue.TrimLeft(_T(" ")) and sNewValue2=sValue.TrimRight(_T(" ")) but I cannot get the expected value. Can anyone help? Thanks in advance!

Member Avatar for mitrmkar
0
135
Member Avatar for Campbell1510

As part of my coursework, I have to test my program on a different operating system to the one it was created on, XP. Anyone know of a good compiler for a mac since it is only other sytem in the school?

Member Avatar for Ancient Dragon
0
90
Member Avatar for ishandoshi

Hii, The problem statement i am referring to is: Buttons Each cell of an N x N grid is either a 0 or a 1. You are given two such N x N grids, the initial grid and the final grid. There is a button against each row and each …

0
85
Member Avatar for alexa868

hey guys! so I need to create a matrix 6x6 and then fill it with random numbers from 0 to 3.... and I need to leave the diagonal of the matrix with 0s... The rows are supposed to be soccer teams so if row 1 wins row 2... the program …

Member Avatar for alexa868
0
94
Member Avatar for cerr

Hey all! I have this assignment for my school project to create a simple address book using classes that do the routine stuff like adding a contact, searching it, modifying it, deleting it... Here is the code but it won't run properly. I tried but couldn't figure it out. It'd …

Member Avatar for cerr
0
150
Member Avatar for wiglaf

I have been searching my texts, the web, and DaniWeb for information about how to share data between compiled C++ executables. I've been studying extern variables and named pipes without success. A typical program calls another program like this: float Pi = 3.14; system("AdjustSeaLevel.exe Pi 5.4 11.2 c f g"); …

Member Avatar for Frej
0
2K

The End.