49,757 Topics

Member Avatar for
Member Avatar for namratag
Member Avatar for lohath

[QUOTE]: Hello every one. I have described what program has to do and what i have did plz help me. Program has to take input from the user(i1) and print it, but if the user doesn't give any within 2 seconds program has to print some other variable(i2) ( which …

Member Avatar for L7Sqr
0
128
Member Avatar for BCBTP

I was wondering if anyone has some good examples of running python functions and scripts within C++ using the Python C API. I can't seem to understand the ways of the Python C API, and was expecting something more similar to the Lua C API. The real question is "What …

Member Avatar for vijayan121
0
316
Member Avatar for Kel_007

I am currently in my first year of electrical and electronics degree programme. I would like to ask for assistance on how to go about starting this project. A little guidance from you experienced people would really help me to complete my project. Thank you in advance. DETAILS : -four …

0
42
Member Avatar for stupidenator

Hi everyone, I am having a problem while trying to do an operator overload of operator<< I am getting: [CODE]Stack.cpp:96: `std::ostream& Stack::operator<<(std::ostream&, const Stack&)' must take exactly one argument Stack.cpp:96: no `std::ostream& Stack::operator<<(std::ostream&, const Stack&)' member function declared in class `Stack'[/CODE] I can't seem to find why I am getting …

Member Avatar for journeyjie
0
10K
Member Avatar for Labdabeta

I am getting extra garbage at the end of the string returned by this function. Why? [CODE]char *read(char *fname) { FILE *file=fopen(fname,"r"); printf("Opening input file...\n"); if (file==NULL) return NULL; int length=0; char *ret=new char[length]; while (!feof(file)) { char ch=fgetc(file); char *temp=new char[length+1]; for (int i=0; i<length; i++) temp[i]=ret[i]; delete[]ret; if …

Member Avatar for mike_2000_17
0
222
Member Avatar for NoUserNameHere

If there were 2 nodes like this: [url]http://i.imgur.com/21x2m.png[/url] Would newNode be pointing to itself if there was a code like: [CODE]newNode->next = intNode->next[/CODE] Also what would intNode be pointing at if this code was right after the one above it: [CODE]intNode->next->prev = newNode[/CODE]

Member Avatar for mike_2000_17
0
145
Member Avatar for bricemfr

Hello, Im very very new at C++, I have this assignment that I can't figure out, if anybody could me, I'll be very grateful. Create a List class with the following interface (at a minimum): bool addItem(Node&) //add an item to the list, return true on success Node* getLargestNode( ) …

Member Avatar for phorce
0
129
Member Avatar for a.muqeet khan

guys i have a prob i wrote the code for file handling the prob is that the code is working perfectly it also creates the file yet it doesnt store any thing in it and after the del the files it created in my hard disk he wont create any …

Member Avatar for v3ga
0
207
Member Avatar for alex905

Hi guys, I am transferring figures between a Neural Network and a Genetic algorithm. This means I have to do some scaling. I have found out how to scale to produce a value between 0 and n but not between -n and n or x and y. So all in …

Member Avatar for mrnutty
0
168
Member Avatar for Chuckleluck

Hello, I'm working on a game, and for this game, I created a class. There is one object of this class for each player in the game: [CODE]class PlayerClass { public: PlayerClass(Nationality); // Constructor ~PlayerClass(); // Destructor sf::Sprite PlayerFeet; sf::Sprite Arms; sf::Sprite Body; sf::Sprite Head; int HitPoints; GameClass CurrentClass; }; …

Member Avatar for Chuckleluck
0
184
Member Avatar for Zay

Hello; i wrote this code for a star triangle , but it told me it contains some errors , Do any 1 can help me plz ? it should be like this : [CODE]******* ***** *** *[/CODE] [CODE]include <iostream> #include<cmath> using namespace std; int main() { int n=4; for ( …

Member Avatar for Schol-R-LEA
0
187
Member Avatar for esesili

Hello All, Currently I am working on an GUI using a tutorial video. In video when tutor types n = System::Convert:: , after :: a bunch of options appear like n = System::Convert::ToInt32. However, when I type same phrase n = System::Convert:: after :: no option appears. How can I …

Member Avatar for esesili
0
158
Member Avatar for vlaskiz

Got a program code so far to: [CODE]#include <string> #include <fstream> #include <iomanip> #include <iostream> using namespace std; //---------------------------------------------------------------------------- const char Cdat[] = "Data.txt"; const char Crez[] = "Rezult.txt"; const char Canalyzis[] = "Analyzis.txt"; //---------------------------------------------------------------------------- void TrimmText(const char dfv[], const char rfv[], const char afv[]); void AnalyzeLine(string &lin, string & …

Member Avatar for vlaskiz
0
138
Member Avatar for khanthegamer

I want to create a do while loop for a statement to keep on looping until a following number or string value is passed. this is the code that i was trying to put in. [CODE] #include "vending.h" int main() { cout << "\n\n\n\n----------Welcome to the coolest vending machine!!!!!!!-----------\n\n"; cout …

Member Avatar for PrimePackster
0
377
Member Avatar for Zssffssz

What would happen if I (somehow) made an enum bigger than unsigned int? Each item in one is assigned a numerical value, I'm guessing that is unsigned int. Would it be boring like an error message or fun? Knowing what's allowed with naming the values there is more than enough …

Member Avatar for vijayan121
0
131
Member Avatar for ztdep

Dear friends: I am using " Seldon c++ libary for linear algebra, http://seldon.sourceforge.net/" in my heat transfer code. the paltform is vs2010. I use the Seldon::Vector<double> in my class mesh to store the x y coordinates. I include the "Mesh.h" in my main.cpp.but it gave me some error about seldon …

Member Avatar for ztdep
0
266
Member Avatar for PrimePackster

Well I just want to know, how to give variable size for an array(Particularly, second subscript). For example, like this [CODE]#include<iostream> using namespace std; int main() { int a,b; cout<<"Enter the size for the 2D array"<<endl; cin>>a>>b; int*A=new int[a][b];[/CODE] for a its ok, But how to make it work for …

Member Avatar for PrimePackster
0
315
Member Avatar for jim_underpants

Design and analyze an algorithm that searchs for an element x in a sorted table A(with n elements), so that its complexity is O(logD). D stands for distance, counting the amount of elements between the first element and the element x in table A. Simpler, D is the position of …

Member Avatar for mrnutty
0
121
Member Avatar for kutuup

Hello, I am putting together a shoddy game for a 48 hour game contest and I have a problem. When I run the program from within VS2008 (by clicking the start debugging button) the program runs fine. I'm doing this in release mode btw. However, If I try and run …

Member Avatar for kutuup
0
139
Member Avatar for tomtetlaw

I'm not sure if this is the right forum to post this in, but here goes: I want to make a 3D map editor for my game. I want it to have various panels/buttons around the 3D view in the center. What would be the best way to do this? …

Member Avatar for mrnutty
0
55
Member Avatar for esesili

Hello All, I have been using c++ console applications for a while. I need to develop some graphical user interfaces. Even though there are many ways of developing a gui, I am not sure what is the most easy to learn and use. There is a library called Q4 library, …

Member Avatar for LdaXy
0
326
Member Avatar for jeevsmyd

I'm using turbo C++. For my SIC assembler I need to read user the input assembly language program from a text file.Each line of the program contains a maximum of 3 words , LABEL OPCODE and OPERAND. LABEL or OPERAND or both can be absent by OPCODE is a must. …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for misalazeem

Hello Everyone, I am writing chess code in C++ using a main cpp file and functions only.. SO basically am done with everything except the checkmate condition... the only conditions for checkmate i have checked are the movements that king can make.. but there might be other possibilities of saving …

Member Avatar for arkoenig
0
1K
Member Avatar for Raisefamous

[QUOTE]Write a program which finds the factorial of a number entered by the user. (check for all conditions) (Beginner).[/QUOTE] Hi, My knowledge about C++ and programming so far is 27 youtube videos. It took me 1,5 hours to figure out and write this :) [code]int main() { int x = …

Member Avatar for WaltP
0
257
Member Avatar for KazenoZ

Hello, I've come across [URL="http://www.daniweb.com/software-development/csharp/code/258293"]this thread[/URL] while trying to embed a mp3 file in my .NET project, but am having some problem, despite how simple this tutorial is, and just about every other thread on the internet say the same thing. After adding my file to the solution explorer, I …

Member Avatar for thines01
0
90
Member Avatar for Goshutu

Hi, i am doing a multiple-file project and i come across a difficult obstacles. I want your help, DaniWeb readers on this problem, which i find very strange: [CODE] #include "stdafx.h"//i have included vector header here #include "globals.h" #include "functions.h" using namespace std; #ifndef CPIECE #define CPIECE class CPiece { …

Member Avatar for Goshutu
0
343
Member Avatar for MishMash95

so basically i want to be able to organise info in my console application, im a beginner with C++ but im making a server for a game. Basically at the moment the playerlist looks like this: [ICODE]player [32] |Kills: 30 |Deaths: 45 tt [32] |Kills: 222 |Deaths: 2[/ICODE] im using …

Member Avatar for pinsickle
0
80
Member Avatar for pseudorandom21

I've been trying to make a reliable IRC client for a while now, and I know very little about sockets. I have read the RFC quite a bit, but programmatically responding when appropriate, and detecting errors still boggles me. How is the program to know the server will send three …

Member Avatar for pseudorandom21
0
150
Member Avatar for tsudeily

I'm working on my take home final for my Intro to Programming class and need to add the ability to search my class.txt file for a specific record by inputting the student ID. I can't for the life of me figure out what needs to be done. [CODE] #include <iostream> …

Member Avatar for thines01
0
223

The End.