49,761 Topics
| |
Can anyone help me make an inventory program in c++??,.My task is to create an inventory program that reads from a file and then allows the user to manipulate the data and overwrite the file. I'm a total beginner when it comes to c++ so please use simple codes! | |
Hi, I've been programming a lot of c code, and now I'm trying to set my mind into the c++ way of doing things. so I'm trying to avoid pointers, and use refs instead. As far as I understand pointers are to be avoided using stl's for instance. I have … | |
I don't know how many C++ coders might be out there, but I've been trying to get this question answered about multiple inheritance. Say I have a class called B that inherits from A: A -> B Now, I create a class called C that, perhaps due to programmer unfamiliarity … | |
Hey everyone, still learning c++ I had a question. How do I create an array that will hold strings of text. such as: ??? map[10]; map[1]= "text"; map[2] = "text2"; map[10] = "text3"; cout<< map[1] "\n"; help would be great ink | |
Hi, I recently was trying to learn how to write DLLs and was doing ok until I ran across this interesting problem. It seems that the function is not receiving the last argument. Here is my code for the dll [code]#include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID … | |
I have an input file that has call to function and arguments that are passed to that function. There might be one argument or two. A simple while loop for input will not work ex-while(inputf >> function >> arg1 >> arg2) because if a function has only one argument then … | |
Hello everyone! I've started a project on SF.net to create a small yet modern IRC client (µIRChat or simply µIRC). However, there one thing that I really can't decide before I start, and that is the language to use. My idea came from µTorrent, which is, as far as I … | |
[URL="http://www.daniweb.com/forums/post303743-1.html"]Q.Write a program which will print all the pairs of prime numbers whose sum equals the number entered by the user. ( suggested by Aniseed ) (Intermediate) [/URL] [code=C++] #include<iostream.h> #include<conio.h> #include<math.h> int prime(int); void main() { int i,j,c1,c2,num,f1,f2; clrscr(); cout<<"Enter the number-"; cin>>num; for(i=2,j=num-2;i<=num/2;i++,j--) { f1=prime(i); if(f1) { f2=prime(j); … | |
I will explain... I downloaded `mysql-5.0.45-win-src.tar.gz` from Mysql download area.I tried to built Mysql.sln inside that,but i am getting errors(about 58) like Error 149 fatal error LNK1181: cannot open input file '..\zlib\release\zlib.lib' mysql_upgrade Error 319 error PRJ0019: A tool returned an error code from "Performing Custom Build Step" mysqld Error … | |
guys, what do you think is the best compiler for beginners in C++? actually we are asked to make a game in C++. we are now using Dev C++, but we can't find a graphics library in it. thanks. | |
Hi all. I've done some bit of programming in the past, mostly in python and some C aswell. (I can still remember that "C for dummies book" hehe). I'm trying to get started with some anticheat software, of course I'll start with some easy methods first before trying anything more … | |
okay, so i gotta make a good enough hash function that should be able to make me a key for out of two integers ( -1000000 <= x, y <= 1000000 ), and should work...well atleast 80% of the time so i could store these in an one-dimensional array... i've … | |
I'm just writing a reading for the time a binary file where I stored records of my objects. It seems woorks very well. Now I'm working for random access at position "X": [code] ifstream myFile(fileName,ios::in); myFile.seekg( (X*sizeof( object )) , ios::beg); [/code] Should be ok. Before I start to write … | |
Hey again. just want to know how to create a query such as an insert query with MS access and C++. this is the code im using to connect to the database and im using Dev C++ [CODE=syntax]#include <windows.h> #include <stdio.h> #include <string.h> #include <odbcinst.h> #include <sql.h> #include <sqlext.h> #include … | |
my program is suppose to count d number of occurrences of a chars in a file. i just dont know how to store d occurences. this is wat i have done up to now. [code=csharp] #include <iostream> #include <fstream> using namespace std; ifstream fin; void charactercount(int& w, char& s ); … | |
The recursive function is only reversing the first and last characters of a string. I've been trying for hours but cant find the error. Any help would be awesome. The code: [CODE] #include <iostream> #include <string> using namespace std; void str_reverse(char str[], int length) { char temp, temp1; int starti=0; … | |
Hi, I am a new programmer - I'm taking a course of C++ programming in College. I have a quick question - well, I hope it's quick. After I create a program and try to run the program, the .exe file will pop up and in less than a second … | |
Hello, i just started with on my new school and we are going to make an application that ask how old you are. If you're 13 to 19year old it should say ''Teenager'' But if you write for example 8, it should say '' little kid ". I started to … | |
Hi i've got a problem. I keep getting this awesome error "[Build Error] [Project1.exe] Error 1" I copied this source code from [url]http://www.daniweb.com/forums/thread56924.html[/url] I just can't seem to get it to work. can someone pls help [CODE]#include <windows.h> #include <stdio.h> #include <string.h> #include <odbcinst.h> #include <sql.h> #include <sqlext.h> #include <sqltypes.h> … | |
Hi, I'm learning C++ at the moment using one of Jesse Liberty's books and got to the pointers day. They ask to code a stray pointer as an exercise and give as a solution the following code: [CODE=syntax] int main() { int *pVar; *pVar = 9; return 0; }[/CODE] Could … | |
Hi all, I'm trying to figure out why TH I get these error unhandled exception at <address No.> in <my project neme>.exe: <address No.>: Privileged instruction and another : unhandled exception at <address No.> in <my project neme>.exe: <address No.> : Access violation writing location <address No.> when I try … | |
| I've spent entire night and day searching on the internet how to solve my problem, and i couldn't find anything... so please help me, if you know :( this is piece of my code: [code] int main () { string line; cout<<"Welcome!"<<endl; getline(cin, line); while (line!="0") { hello (line); getline(cin, … |
hey all :) I'm making a console program, and I want to do that when you run it from the terminal, you can give arguments like -debug (./program -debug). How do i get whether an argument is set or not in the code? i've tried #ifdef debug, but it didn't … | |
| well i didn't have to include anything except string with working with strings and getline, and getline works... but there's another problem. i always have to press enter twice for another line of code to read ;_; |
Hello and hii fellows.... I want your help right now in making a BST in which we can perform treeSearch....treeMINIMUM....treeMAXIMUM....treeINSERT....treeSUCCESSOR....treePREDECESSOR....treeDELETE....alongwith INORDER....POSTORDER....PREORDER traversal methods.... I have made a program consistiting of all methods excluding treeDELETE.... I'm ordered to make a tree-class....and a structure for node of a tree.... but im confused … | |
Hi there I have a problem creating a slot machine game in turbo c++ because I cant get the value of the randomize number.... | |
Hello everyone. I am new to coding, taking an introductory C++ class at Baylor University. I am trying to get this standard deviation problem worked out, but I just pulled an all-nighter on it thinking it would be simple, but it is not. I have attached the prompt for the … | |
I have the following function. in this function i am not able to push back in vector. I will explain how it works. if same f_pin will comes in the second iteration compared to first iteration of EventNum loop it will get into if Loop and have to push into … | |
I want to develop some plugins for Mozilla Firefox and Internet Explorer. I download de Gecko SDK from mozilla.org, but all mozilla SDK development is by default focused on Visual Studio. And i don´t have Visual Studio. So then i adapted my own version of Gecko for Dev C++ ( … | |
Hii, I have output from computation code called cdof and it is double. i want to creat a file either cdof.log or cdof.dat where i can store values of cdof after each iteration or time step. Please suggest me how to create files using iostream. Thanks |
The End.