132,726 Archived Topics
Remove Filter ![]() | |
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++ | |
[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 | |
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? | |
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++ | |
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++ | |
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 ![]() | |
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++ | |
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 … | |
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 … | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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 … | |
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++ | |
What if you were told to use arrays to solve this? Software Development c++ | |
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++ ![]() | |
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++ | |
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++ | |
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++ | |
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++ | |
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 | |
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++ | |
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] … | |
# 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++ | |
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 | |
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++ | |
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++ | |
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++ | |
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 | |
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++ | |
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 … | |
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++ | |
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 … Software Development c++ client-server microsoft-access visual-basic visual-studio web-design web-server windows-server | |
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++ | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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++ | |
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++ | |
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;:-| | |
:?: 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 | |
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++ | |
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 |
The End.