132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for compshooter

I am trying to grab an input file and outfile file from the user. I can grab the input file no problem, but Dev C++ just steps right over the following line... [code] cin.get(ofname, 150); //grab filename from user[/code] Here is some more of the code. Does anyone have any …

Software Development c++
Member Avatar for compshooter
1
102
Member Avatar for rati

[B]i want to find out small projects to work upon so as to improve my grip over c, can someone tell me some sites having projects in c:confused: [/B]

Software Development c
Member Avatar for rati
1
117
Member Avatar for Quan Chi2

I'm trying to use input from a text edit box to delete a file. The input from the textbox will be the file location and the delete button will use DeleteFile() to delete the file. [img]http://img436.imageshack.us/img436/5578/deleteboxvn0.png[/img] Do you know what I mean?

Software Development api c++
Member Avatar for Han1977
1
125
Member Avatar for herge

Hi All: I have downloaded C++ 2005 Express from Microsoft. I then run a date + time program, the compiler says the functions I am using are deprecated, and I should use localtime_s. So You go to Microsoft, search for localtime_s. You throw the example code into your compiler. Bingo …

Software Development c++
Member Avatar for WolfPack
1
416
Member Avatar for RichC

I created a random number game where the user tries to guess the number using a while statement with three ifs in it for high low and correct number. but after the user guesses the the number it ends the while and the program. How can I make it so …

Software Development c++
Member Avatar for RichC
1
129
Member Avatar for hoosier23

i'm very much a newbie, so pardon me if i am breaking programmer ettiquette, but could someone debug this, please? i could use a lift after 8+ hours workin on this... this is player.h [CODE]#ifndef PLAYER_H #define PLAYER_H using namespace std; class player { private: char* name; int bankroll = …

Software Development algorithm asp c++ user-interface
Member Avatar for iamthwee
1
171
Member Avatar for sadsack

Hello, I just downloaded express C++ 2005 ed. and I can't get even a simple code snippets to compile. this is just a loop, the compiler does not compiles (cout) this is what I get: error C2065: 'cout' : undeclared identifier Thank YOU:cry: renny [CODE]#include "stdafx.h" int _tmain(int argc, _TCHAR* …

Software Development c++
Member Avatar for herge
1
109
Member Avatar for Diode

I tried typing [CODE]printf("\033[34m");[/CODE] for blue foreground color, and other values, but nothing worked. So I included: [CODE]device=D:\WINDOWS\system32\ansi.sys[/CODE] and [CODE]devicehigh=D:\WINDOWS\system32\ansi.sys[/CODE] into my system.ini file to load the ANSI driver, both under the device part of the file, and it still didn't show any color. My Jamsa's C/C++ Programmer's Bible tells …

Software Development c++ display
Member Avatar for Salem
1
199
Member Avatar for Killer_Typo

Howdy there all again. I have been working in C# for some time and think i am ready to graduate to a real language that can actually work hand in hand with memory managment :P so my first venture is to write a piece of software that will open a …

Software Development c++ pascal xml
Member Avatar for Killer_Typo
1
388
Member Avatar for ankit_rastogi82

I made a Cpp application wihich links with shared objects. But when I runs the application, it crashes surprisingly before entering into the main() control block. After trying with gdb I came to know it is crashing while reading symbols from a library. GDB says something like Reading symbols from …

Software Development c
Member Avatar for WaltP
1
78
Member Avatar for reRanger

Hello: I was wondering if anyone in this forum could point me in a direction (a link) where I could find practice projects (similar to Python [URL="http://www.daniweb.com/techtalkforums/thread32007.html"]Projects for the Beginner[/URL]) dealing specifically with C++ classes and their related functions? Thank-you in advance, reRanger

Software Development c++ python
Member Avatar for Bench
1
117
Member Avatar for mightymousenick

Hi people i am kind lost at where to start for this lab assignment i have gotten for my mid term break: Olympiad 2012 Problem It's London! International Olympic Committee President Jacques Rogge has announced that London will host the 2012 Olympic Games and Paralympic Games. 6 July, 2005, Singapore …

Software Development c++ queue
Member Avatar for mightymousenick
1
134
Member Avatar for linq

look at "dc.SelectObject(&pen)" and "dc.SelectObject (&brush)",here no matter I use "&" or not it results the same. why is that? [code] void CMainWindow::OnPaint () { CPaintDC dc (this); CBrush brush (RGB (255, 0, 0)); CPen pen (PS_NULL, 0, (RGB (0, 0, 0))); dc.SelectObject(&pen); dc.SelectObject (&brush); dc.Ellipse (0, 0, 200, 100); …

Software Development c
Member Avatar for Ancient Dragon
1
90
Member Avatar for linq

the following code is from the examples on the book CPen pen (PS_SOLID, 0, RGB (192, 192, 192)); CPen* pOldPen = dc.SelectObject (&pen); //do some drawing staff here dc.SelectObject (pOldPen); I know once I create a pen, I can do some drawing staff, but why should I add "CPen* pOldPen …

Software Development c
Member Avatar for Ancient Dragon
1
123
Member Avatar for micmac700

I am working on a program that uses interrupts and a buffer to read/write characters from/to the console screen. (This is a tty.c program with ttywrite(), ttyread(), ect...) I also have a given queue folder, which contains queue.c that has the methods: [code] int init_queue(Queue *q, int max_chars); make a …

Software Development c++ queue
Member Avatar for Lerner
1
443
Member Avatar for skwalker112

I have to write this program by 12 a.m. tonight and i need help writing this program below. I will work with whoever can give me help all night if that is what it takes I'm trying to write a small code that will ask the user to choose between …

Software Development c++
Member Avatar for FireSBurnsmuP
1
137
Member Avatar for bkas3
Member Avatar for Salem
1
61
Member Avatar for hoosier23

I am trying to create a blackjack deck of cards (blackjack uses five decks... 5*52 = 260) Suit is irrelevant in blackjack. How do I create my deck? [CODE]#include <iostream> using namespace::std; int main() { char thedeck[13]={'2','3','4','5','6','7','8','9','0','J','Q','K','A'}; char deck[260]; for (int i=0;i<20;i++) { for (int j=0;j<13;j++) { thedeck[j]; } } …

Software Development c++
Member Avatar for iamthwee
1
125
Member Avatar for Laiq Ahmed

please help me understand the folowing code.... [code] class A { int a; public: A() : a ( 0 ) {} int get() { cout << "Hello WOrld " << endl; return 0; } }; int main( int argc, char** argv ) { cout<< ((A*)3)->get() << endl; return 0; } …

Software Development c++
Member Avatar for Ancient Dragon
1
126
Member Avatar for hay_man

I am programming in C++ and am attempting to find the intersection of two strings, only the items common to both and thus return a third string with these items. Essentially, I am trying to write the code for the STL library set_intersection. To approach this problem I thought of …

Software Development c++
Member Avatar for Micko
1
249
Member Avatar for waldis

I'm having difficulties to get the buffer read 10 numbers from a file, then after it's empty read next 10 numbers, and so on till eof is reached. The input file contains several lines of data, with a single integer value on each line. Here is my code (I have …

Software Development c++
Member Avatar for waldis
1
127
Member Avatar for leonpwhirl

okay, I haven't had to do much development work in c++, I spend most of my time in c#. I am trying to finish a course and my teacher gave an assignment on dealing with union and bitfield structure. The assignment is: [COLOR=#000000]Write a C++ program that reads a 64-bit …

Software Development c++
Member Avatar for leonpwhirl
1
774
Member Avatar for complete

Included file not found during compile time. This must be an easy question for you to answer. I have a header file (basetsd.h) that is located in the C:\Program Files\Microsooft Visual Studio\VC98\Include directory. Where do I set the path to this header file? I don't want to hard code it …

Software Development c++ file-system visual-studio
Member Avatar for FireSBurnsmuP
1
181
Member Avatar for yeya

Hi, I'm doing a VC++ project, which requires me to create multiple CWnd objects and put them into one dialog box for viewing. For example, I need to create 100 buttons with 1-100 written on them, and put them into one dialog box. Of course the dialog box can't show …

Software Development c++
Member Avatar for Ancient Dragon
1
98
Member Avatar for lilprogrammer

Hi, I am trying to convert a string length to a char and store it in an array. For some reason, even though its not giving me any error, when I try to print the array out, the place where I store the strlen is blank. Here's my code: [code] …

Software Development c google
Member Avatar for andor
1
397
Member Avatar for yadavvirendra

# include<iostream.h> int main() { int ar[2]={8,2}; // (1) int var1=66; //(2) int var2=111; //(3) int* ptarray[5]; //(4) ptarray[0]= ar; //(5) ptarray[1]= &ar[1]; //Address of second element of array ar // (5) ptarray[2]= &var1; //(6) ptarray[3]= &var2; //(7) ptarray[4]= &ar[0]; //(8) // To keep code small I use a loop …

Software Development c++
Member Avatar for Micko
1
127
Member Avatar for Line

Hey! I'm looking for some help on what I'm doing wrong as I'm new to C#. I'd really like it if you can explain why my code isn't working and then offer some help on how to fix it without "making it easy" for me ;o) I have to understand …

Software Development linked-list
Member Avatar for Tekmaven
1
571
Member Avatar for CurtisBridges

I have a group project of designing the old board game "CLUE" in my C++ class that can be played by 1 person against the computer. If someone would help me get started it would help a bunch. I think this could be a neat project, but have no clue …

Software Development c++
Member Avatar for ~s.o.s~
1
131
Member Avatar for CurtisBridges

Would somebody chck this code please. I am a struggling C++ student and need all the help I can get. Thanks, Curt [COLOR=#008000]Here are the directions: [/COLOR] create a function that check's the number, put's out whether it's odd or even and adds it to the total variable [code] [COLOR=#0000ff]#include[/COLOR][COLOR=#800000]"stdafx.h" …

Software Development c++
Member Avatar for ~s.o.s~
1
144
Member Avatar for isaacmacdonald

I wrote a simple program that sums the square of integers m -> n. If sum is declared as [B]double[/B] it gives something like 4.16..x10^10 for integers 1 -5000. However, if sum is declared as an [B]int, [/B]for the same range it reports -1270505460. Obviously this has something to do …

Software Development c++
Member Avatar for FC Jamison
1
176
Member Avatar for hariza

Hi Guys, I know this will be easy for anyone here and it might take 2 minutes to right the code. I wonder if someone can help me to right a loop using strtok() to be able to extract the words form a string like "various systems analyze the model …

Software Development c
Member Avatar for WolfPack
1
1K
Member Avatar for sugantha

I ve read that iostream is a derived class of fstream ,so including the "fstream" header is all sufficient to perform console i/p and o/p(ie cin and cout) .this worked fine as long as I used Turbo C++ compiler but now I ve switched to Bloodshed Dev C++ compiler and …

Software Development c++
Member Avatar for Salem
1
129
Member Avatar for bg123

I am doing a mazetraversal program that inputs a .dat text file. Im having trouble taking in account of the whitespace. Here is my code and were the ?????? is where it needs to go. I think its just a small "if" statement taking it in account. [CODE]#include <iostream> #include …

Software Development algorithm c c# c++
Member Avatar for Lerner
1
129
Member Avatar for Diode

Hello, :) I have chosen to go with getch() for my keyboard input. However, when I went to experiment with it, I got some unexpected results. The 'Y' in 'Your word was ' is missing in the command prompt when I run this program after I compile using gcc, and …

Software Development c++
Member Avatar for WaltP
1
135
Member Avatar for SOLO13

Im planning in buying this. Is this all I need to start coding? Thanx Overview [B]The Visual Studio® 2005 Standard Edition from Microsoft®[/B] is a comprehensive, high productivity professional development environment for individual developers for building enhanced performance, multi-tier applications for Windows®, Web, and common consumer mobile devices. It allows …

Member Avatar for Ancient Dragon
1
112
Member Avatar for MrLew

I have a 2 part problem. 1) In circleTypeImp.cpp I am being returned incorrect values for circum and area variables. I have tried using both float and double variable type with no luck. Any pointers? 2) I have read over how to derive a class a number of times and …

Software Development c++
Member Avatar for MrLew
1
209
Member Avatar for VinceColeman

I have to use a variable of type double to store and manipulate a value for an amount of years. This means I have to ensure that the data input by the user is an integer. The program will accept a non-integer value, but I want it to continue reprompting …

Software Development c
Member Avatar for FC Jamison
1
187
Member Avatar for seeppms

I am using filepointer in C. when I compile the code and run it for the first time the filepointer works fine and logs are written into log files. But during next hits there is an inconsistency in logs getting written. sometimes getting written and someother times not written. But …

Software Development c file-system
Member Avatar for WaltP
1
160
Member Avatar for Diode

Hello, I am trying to develop something that, when you press a character on the keyboard, puts a char into a char-type variable. Should be easy right? Well, I don't want to require the user to have to press ENTER when they press the key. Maybe scanf isn't the right …

Software Development c++ unix
Member Avatar for WaltP
1
1K
Member Avatar for bhushanm

hi, in my code i am creating a tree, which have a 20 levels and and each level we have 10 nodes. i.e every node can have a 10 children. for them i am allocating memory for each node. each node is stracuture which occupies the memmory around 40 bytes. …

Software Development c
Member Avatar for jim mcnamara
1
168
Member Avatar for beginerprograme

this is a program that i have to write. followed by the code i already written. Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical price of a stock. The program will allow users to query the stock price …

Software Development algorithm c data-structure
Member Avatar for ~s.o.s~
1
133
Member Avatar for Ajay Raj

Predict the output of the following code: #include < IOSTREAM > int main() { char weekdays [7][10]= { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; cout<<**weekdays; } Could any one let me know answer and also the explaination if possible

Software Development c++
Member Avatar for Ajay Raj
1
128
Member Avatar for Flay

I allready asked a question about this inside JoBe's Thread about the stl <map> ([URL]http://www.daniweb.com/techtalkforums/post252520-10.html[/URL]), but maybe it's better if i make a new thread about it. The problem is, when i try to use <map> inside my project i get 2 errors: C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\map(16) : error C2143: …

Software Development c++ storage visual-studio
Member Avatar for Flay
1
100
Member Avatar for hariza

Hi Guys, Just wondering I'm newbie writing C programs and I don't expect to get the entire code here but I was allocated a task/assigment to create a C program that emulates a search engine so I was given a bunch of text files that contains HTML data and I …

Software Development c
Member Avatar for hariza
1
93
Member Avatar for matrimforever

I am trying to write a simple program in c++ to take a beginning delivery time in 24 hour time and an ending delivery time then taking 25% off that time(making the end time 25% sooner). For example, i'd have a user enter in 0900 for start time and 1030 …

Software Development c++
Member Avatar for FC Jamison
1
158
Member Avatar for hay_man

Here's a really simple problem. I understand the basic search algorithms however, is there a difference when implemeting them in regards to vectors or strings? I want to determine if a certain value using a sequential search, the code would look something like this; [code] #include <iostream> #include <fstream> #include …

Software Development c++
Member Avatar for hay_man
1
109
Member Avatar for Karthi Msc

Hi can anyone help me in doing the following Given n Boolean variables x1,x2,…..xn, we wish to print all possible combinations of truth values they can assume. For instance, if n=2, there are four possibilities : true, true; false, false; false, true; true, false;:-|

Software Development algorithm c++
Member Avatar for Salem
1
165
Member Avatar for poorni

:?: haiii iam a student from engg college... i juz have a lab on compilers.. i have a program called conversion of Regular expression to NDFA.. can u plz help me with de source program... in C:?: :?: :idea:

Software Development c
Member Avatar for Karthi Msc
1
156
Member Avatar for wheelz

I am a newbie to C++ and I'm not sure of anything at this point in time however,I got a problem with the starting phase of this program that well prompt the user to input a single character and output a inter4national Civil Aviation Word !!!!! The prolem that I …

Software Development c++
Member Avatar for Ancient Dragon
1
104
Member Avatar for stupidenator

Hi, I am in need of some help with a small portion of my program. I have an input file as follows: [CODE]10 9 15 program1 11 1 30 important 12 11 10 junk program 14 15 5 other program 17 6 20 another program[/CODE] I need a function to …

Software Development c c# c++ file-system ios
Member Avatar for stupidenator
1
173

The End.