49,757 Topics

Member Avatar for
Member Avatar for pd2001

hello everyone, i am trying to read a unformatted text file using ifstream. i want to read the lines..i have done by using getline. but my text file format looks like firstname:abd lastname:cbd user name is abd cbd age is 45 height is 66cms I was able to read line …

Member Avatar for Despairy
0
123
Member Avatar for margeaux54

ı have a question. I know which data type and its specifiers . but ı do not know that for example "int" data type how many number takes or long integer how many number takes. ı calculated their bytes but still ı do not know when ı choose them. again …

Member Avatar for Fbody
0
169
Member Avatar for Khoanyneosr

[code] 1>------ Build started: Project: DirectXtutrials, Configuration: Debug Win32 ------ 1>Build started 3/24/2011 5:24:05 PM. 1>InitializeBuildStatus: 1> Touching "Debug\DirectXtutrials.unsuccessfulbuild". 1>ClCompile: 1> main.cpp 1>ManifestResourceCompile: 1> All outputs are up-to-date. 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 1>C:\Users\Konnor\Documents\Visual Studio 2010\Projects\DirectXtutrials\Debug\DirectXtutrials.exe : fatal error LNK1120: 1 unresolved externals …

Member Avatar for Khoanyneosr
0
270
Member Avatar for Despairy

we just started studying about linked lists and i wrote a simple code to build up a link list. than post the sum of all the numbers inside the list my problem is that i need to delete all even numbers and i cant figure out what is wrong with …

Member Avatar for Despairy
0
4K
Member Avatar for rp45

Hello, I just joined this web site and i'm new to programming and i'm stuck on this program, can't seem to finish it, after couple of days of trying to figure this program out, i realize i need help. The program is pretty much done i just don't know where …

Member Avatar for VernonDozier
0
92
Member Avatar for a.muqeet khan

guys i made a program and it is working the prob is that it is not displaying the values to in float so guys plz help me in this regard #include "stdafx.h" #include<iostream> #include <stdio.h> using namespace std ; void reduce(int&,int&); class decimal { int numerater; int denominater; public : …

Member Avatar for VernonDozier
0
188
Member Avatar for HASHMI007

[CODE]/* I made point class it has two objct x,y. i made saparate function for giving values to x & y object but when i run the it provide wrong answer. i enter firstValue=5 , secondVaue=6. the program shoul provide same answer same as like(5,6) but result show after excuting …

Member Avatar for HASHMI007
0
109
Member Avatar for v_janssens

I have a class Matrix2D where the matrix is defined as vector<double> elements. I'm trying to use the function Gauss() to perform gaussian elimination on a matrix a [CODE]bool Gauss(Matrix2D& a) { [INDENT][/INDENT]//Gaussian elimination routine }[/CODE] The function itselt works perfectly and if I view the matrix a just before …

Member Avatar for v_janssens
0
161
Member Avatar for mclemon

Hi there! I'm writing a program which has lots of vectors in it...I've named these vectors sequentially - ie vector1, vector2, vector3 etc. What I was wondering is, is there a way of displaying the contents of these vectors without manually writing cout << vector1[0] etc? I know this doesn't …

Member Avatar for vijayan121
0
100
Member Avatar for Derek Elensar

Okay, so I have said code: [code] #include <iostream> #include <cstdlib> using std::cout; using std::cin; using std::endl; int main() { char input[8]; int counter = 0; int newletter; do { cout << "Please enter a 7 letter word to encrypt:\n>"; cin >> input; if(input[8] != '\0') { input[8] = '\0'; …

Member Avatar for Derek Elensar
0
178
Member Avatar for duliduli556

Hi Guys I am trying to read contents of directory... using "FindNextFile(hFind, &FindFileData)" Findfirstfile returned me then first file in the directory.. even though I have somany files in the directory (FindNextFile(hFind, &FindFileData) returning me zero..... can anyone help me... thanks in advance... Thanks

Member Avatar for tkud
0
62
Member Avatar for Voidz

Hi, what's #pragma and #pragma once? I can't find website's that explain it for a noob, as I am a noob. I think it's related to #ifdef? I also think I know what #ifdef is. It's when you want to see if something is defined. Like #ifdef WIN32 #endif. Thanks.

Member Avatar for gerard4143
0
72
Member Avatar for littleleaf

Hey guys, I am writing a C++ program with the help of dynamic allocation of a character array. The size of the array depends on the size of file read. However, when I checked the size of allocated array, it is always 4! So, is there any limit on this …

Member Avatar for jonsca
0
170
Member Avatar for benchz23

i forgot to put DO in my program. since i was instructed to use DO-WHILE LOOP. i still have the same output if i use this code. But better to have the DO inserted. output: 0 0 2 0 2 4 0 2 4 6 0 2 4 6 8 …

Member Avatar for daviddoria
0
159
Member Avatar for duliduli556

hi, could anyone please point me towards a good link or post a code that helps explain how these could be implemented? thanks a lot

Member Avatar for jonsca
0
78
Member Avatar for benchz23

i need to make a program that would display the figure as shown below. using a DO-WHILE structure and a method to implement the task. a C++ program. output: 0 0 2 0 2 4 0 2 4 6 0 2 4 6 8 0 2 4 6 8 10 …

Member Avatar for Fbody
0
170
Member Avatar for schrope

I need help i am not sure if i am on the right track. i have to write a program to calculate the night of nights someone has to stay and what size bed they want. than i have to give a total of cost plus 6% sales tax. her …

Member Avatar for txwooley
0
308
Member Avatar for spixy

I have a problem on programming, its not really my assignment, but my friends... i just thought i can resolve this at C, because i got some backgrounds on it.. but i can't do it my compiler is dev c++ the code must be on C++ not C can i …

Member Avatar for spixy
0
2K
Member Avatar for dospy

recently i understood at last how can i store more values in an int with bytwise operators, also, i have read that #define directives are evil for a number of reasons. one of them: [CODE] #define SEVEN 2 + 5 int result = SEVEN * 5; cout << result; // …

Member Avatar for dospy
0
169
Member Avatar for cyman29

Hey this is from my c++ assignment at Uni. I'm fairly new to programming so i need some help. The program has separate functions after the main() which i have to call everytime i need to use them. So I've sorted an array using a fuction with an algorithm of …

Member Avatar for mike_2000_17
0
188
Member Avatar for visom

Hi, I'm making a program that finds the number of days between two dates (so far you can only put in 1 date because my code is incomplete). The code is incomplete right now but my problem is that the problem is that my code doesn't return a needed value. …

Member Avatar for visom
0
103
Member Avatar for xyzt

Hi all I'm designing a multithreaded application which has long running threads. I need to check some condititons in the main thread, interrupt the threads and end the program if the conditions are true. But i'm not sure if this is the correct/safest way. Here's my pseudo: [CODE]main() { boost::thread …

Member Avatar for thekashyap
0
172
Member Avatar for ashrafu1

hello am making a library program that add, delete and shows record. i am done with it. but now i have a logical problem. the id i input for a book it can be taken by other books. i need to restrict ID for one book which cannot be used …

Member Avatar for griswolf
0
275
Member Avatar for sosongetsu

Its been a little while since i have used Dani Web but i need some help. If the code looks a little off then you have to forgive me. I was getting help from a friend who i found knew less about it then me. Here is the criteria for …

Member Avatar for Chilton
0
171
Member Avatar for sdr001

Hello, I am getting a segmentation fault in my program and do not know why. It occurs when the program reaches: [CODE]for(i=0; i < values.size();i++) items[i].value += values[i];[/CODE] Values have integers inside of it (7,77,2,3). Items is a vector<knapSackStuff> items; and my knapSackStuff look like: [CODE] struct knapSackStuff { int …

Member Avatar for template<>
0
88
Member Avatar for jackmaverick1

Hi, I'm trying to make my own library so that I know the names of the functions and can use them more simply. Also, I normally don't get the File I/O right so if I write the Library once, then I can use it over and over again (without having …

Member Avatar for jackmaverick1
0
177
Member Avatar for Tamlyn

Hey everyone :) Hope you can help Here is what I've done with the instructions given: I need to know the average price difference between the cash and credit prices. But i'm pretty sure that only comes in at the end. Here is what my this function is supposed to …

Member Avatar for Tamlyn
0
116
Member Avatar for kiske

Hello, I'm triyng to connect a camera to a VMR9 filter and I do the following: Create the filter graph Create the VMR9 filter Add the VMR9 Filter to the graph Create the video source filter and add to the graph Create an instance of capturegraphbuilder2 and reference it with …

Member Avatar for rubberman
0
523
Member Avatar for benjybob

Hello there, im writing code for my asteroids game and am nearly finished but ive come across a problem when trying to load the file the save game is written like this and works perfectly fine, it saves the things i want to a text file: [CODE]void WrapGame::save() { cout<<"enter …

Member Avatar for WaltP
0
222
Member Avatar for Khoanyneosr

So i read the "Flush Cin" post at the top of the thread and it just flew right over my head. I have a simple if statement that uses int values to determine where to send the user. If the user enters a char value it shoots itself into an …

Member Avatar for Khoanyneosr
0
157

The End.