51,593 Topics

Member Avatar for
Member Avatar for mamabear

A string consisting of letters and digits. How do you do that? How do you code that?

Member Avatar for Fbody
0
80
Member Avatar for jonnyflash

I'm writing an app that requires a list from Python to be read into an array in C++. The problem I'm having is that I can't get my code to work under any version of Python after 2.4, and I don't think I'm using any deprecated functions. It runs fine …

Member Avatar for Gribouillis
0
1K
Member Avatar for yan_yan

[QUOTE=Ancient Dragon;278809]create a bool flag before the loop starts and set it to false. when a swap is made change the flag to true. on next loop iteration if the flag is still false then no swaps were performed during the previous loop iteration. and please next time use code …

Member Avatar for mike_2000_17
0
76
Member Avatar for Luther von Wulf

What are good name conventions for classes. How for example should the name be different between a base class and a derived class or an abstract class and a concrete class?

Member Avatar for mike_2000_17
0
184
Member Avatar for Duki

Hey everyone, I'm starting a new job on Monday, and I asked if there were any topics I should re-familiarize myself with. Along with the typical data structures, they also mentioned STL. I'm not sure that we ever used STL during my college work (like most classes I assume, we …

Member Avatar for Duki
0
74
Member Avatar for computerdummy30

I need help. Directions: Write a program called powersOf2.cpp and save it in your programs directory. This program should ask the user to input an integer value. It will then raise 2 to all the powers from 0 up to and including the user entered value. For example, if the …

Member Avatar for Fbody
0
111
Member Avatar for ShadowOfBlood

I'm working on an assignment for Computer Science 121. The assignment is to write a program that prompts a user to input an integer and then outputs both the individual digits of the number and the sum of the digits. For example, it should output the individual digits of 3456 …

Member Avatar for 1stDAN
0
4K
Member Avatar for bleedi

Hey! I've got a little problem I have no idea where to begin with. I've got a string and I need to check the insides of it. The string should be formatted like <letter><number>, for example "A1" or "F4". The letters can only be from A to F and numbers …

Member Avatar for Ancient Dragon
0
136
Member Avatar for khaled mohamed

hello, i want to do window by graphics mode in borland c++ but there is a problem when i want to take data from user it isn't appeared in the window i want to appear this data in the screen please help

Member Avatar for Kanoisa
0
96
Member Avatar for sabareesh

class CShape { // store serial number public: static int mnSerialNum; // constructor CShape(); // function declaration virtual int getSerialNum(); // create virtual pure function virtual double Area(double dWidth, double dHeight) = 0; virtual double Perimeter(double dWidth, double dHeight) = 0; virtual void DisplayClassName(); }; error LNK2001: unresolved external symbol …

Member Avatar for sabareesh
0
228
Member Avatar for shanbady

Greetings, i am pretty new to C (a few weeks experience)and i can program some complex programs and small database apps yet i don't know how to program guis in C. Are there any tutorials to program guis for windows in C? (not C++). many thanx if u cn find …

Member Avatar for Nick Evan
0
163
Member Avatar for tennis

If I declared a static variable in a header file, and the header file is included in a couple of .c files. Is there any problem? Thanks

Member Avatar for Nick Evan
0
88
Member Avatar for tkmandanna

Hi, i'm looking to interface C++ programs with matlab image processing and AT commands that are used for sms..The project i'm creating involves a user sending an sms which acts as a trigger, the program should read the data from the sms(it's stored in memory),it should then start a matlab …

Member Avatar for mike_2000_17
0
148
Member Avatar for Scu

I am making a program with list of classes. I have this situation that I'm not aware of how to use: [CODE=c] class clsMyClass { private: unsigned int id, nodStart, nodStop; float pipeLen, pipeDiam; public: void AddElement(clsConducte element); [/CODE] In another part of program I will have a variable list …

Member Avatar for Scu
0
115
Member Avatar for Mafia619

I am making a program in which a user has to enter his username and password inorder to access the main program.....i am making the user enter the password using the [B]getpass[/B] function and i have included the necessary headerfiles i.e. <conio.h> [CODE]do { cout<<"\n\n SIGN IN \t\t"; cout<<"\n\n\n Username …

Member Avatar for jonsca
0
117
Member Avatar for aranjan

Hey guys. Okay so here is a new assignment I have...at the moment I am not sure how to go about taking a vector representing a set and converting it into a tree. Also won't I need to create a new tree for every set? Any help or hints would …

Member Avatar for AkashL
0
131
Member Avatar for Fasola

In my old C++ programming classes I would often trip up on theses basic concepts when things got more and more complicated: 1. Arrays 2. Functions 3. Inheritance 4. Call by Reference 5. Call by Value 6. Pointers I kind of know how they work but don't really know what …

Member Avatar for A.Rehman Amjad
0
1K
Member Avatar for KV305

Hey guys im having trouble completing this C program. Its suppose to ask the user to enter a file to read from, read the file, count how many times each word appears and print the results in a different file(also user input) arranged from high occurrence. Heres what i have …

Member Avatar for Adak
0
120
Member Avatar for bmos

I was assigned to write a program that will verify a password entered by the user. The program should verify that the password has 6-10 characters and atleast 1 uppercase, 1 lowercase, and 1 numeric digit. The program runs, but will only display the length of the password entered and …

Member Avatar for Anyzen
0
6K
Member Avatar for jokulmorder

hi i'm new and i've got this problem i can't figure out when overloading the assignment operator for a queue object. here's what i've got so far: [CODE]nodeType<Type> *current, *newNode, *last; //pointers for adding nodes bool doneOnce=false; if(this!=&otherQueue){ //no self copying destroyQueue(); if(otherQueue.queueFront==NULL) //if queue is empty, save some time …

1
53
Member Avatar for Luther von Wulf

What are some good exercises for an experienced programmer new to C++? I have found lists and suggestions on the web, but they are always simple or I have already completed them in other programming languages like C or Basic. Something that will help with learning modern C++ is best.

Member Avatar for mrnutty
-1
2K
Member Avatar for rowley4

I need to modify my linked list to hold integers instead of strings by modifying the Node, List, and Iterator class. Don't know how to start this. This is my code. [CODE]#include <string> #include <iostream> #include <cassert> using namespace std; class List; class Iterator; class Node { public: /* Constructs …

Member Avatar for rowley4
0
107
Member Avatar for Auraomega

Hi there, I'm in the process of moving some code into Visual C++ 2008, the code works fine when compiled with Mingw however crashes when compiled with VC++: [CODE=c++] s_cell **cell; *cell = (s_cell *) malloc(sizeof(s_cell) * MAP_X); for(int loop = 0; loop < MAP_X; loop++) { cell[loop] = (s_cell …

Member Avatar for Aranarth
0
168
Member Avatar for aexi

Calculating Average and high/lowest test score Hello, I am getting frustrated because I am currently trying to figure out how to solve this program: Write a program that prompts the user for test scores (doubles). The user enters -1 to stop the entry. After all of the test scores have …

Member Avatar for jonsca
0
221
Member Avatar for green-fresh

today when I tried some of member functions which i read about them in a cpp course i found in my c++ compiler (which is visual c++ 6) this error: error [COLOR="Red"]C2228: left of '.length' must have class/struct/union type[/COLOR] when i used this member function: [CODE]str_name.length()[/CODE] instead of strlen() function> …

Member Avatar for jonsca
0
106
Member Avatar for tennis

If I declared a static variable in a header file, and the header file is included in a couple of .c files. Is there any problem? Thanks

Member Avatar for mike_2000_17
0
196
Member Avatar for kfernandez

I need to write a program for my intro class that counts the characters in book i must be able to enter at least 3 books. I can get 1 but when it get to the second it cannot open..help! [CODE]#include <iostream> #include <fstream> using namespace std; int main() { …

Member Avatar for kfernandez
0
71
Member Avatar for boos800

I am working on a hw assignment, and am following a template given by my prof. However, I keep getting an 'argument not declared in scope' error, even though his works perfectly. Here's the code: [CODE] #include <cstring> #include <iostream> namespace cop3530{ int linear_probe(int i, std::size_t cap){ return (i % …

Member Avatar for mrnutty
0
274
Member Avatar for Jacobah

Hi I am using visual C++ 2010 My dialog include button and using event handler I am jumping to request function my problem is that: When I am going back I need to go back directly to specific point. How can I do it? longjump? [CODE]Main() { . . . …

Member Avatar for Jacobah
0
190
Member Avatar for empror9

hello, i have a small project which ask the user to input value of 'x', then show sin(x),cos(x) and tan(x) using this fourmla [url]http://www.daniweb.com/forums/attachment.php?attachmentid=16080&stc=1&d=1280001204[/url] and the project is says that i can use this fourmla to minmise the computation and increase the efficiency [url]http://www.daniweb.com/forums/attachment.php?attachmentid=16081&stc=1&d=1280001204[/url] so my first question, when i …

Member Avatar for mike_2000_17
0
5K
Member Avatar for noora000

Hello, I need to write a programm in C++ to send a sms from a PC to a mobile phone as a part in my project, so can you please help me? Reegards, Noora

Member Avatar for usamakarim
-1
1K
Member Avatar for johnnyturbo3

Hi, I'm new to C++ but I have a Java background. Up until now I have been using header files to define my external classes. However, I've been reading a book, C++ How to Program, and they use the header as an interface (define the prototypes of a class, I …

Member Avatar for mike_2000_17
0
7K
Member Avatar for KV305

Hey guys im having trouble completing this C program. Its suppose to ask the user to enter a file to read from, read the file, count how many times each word appears and print the results in a different file(also user input) arranged from high occurrence. Heres what i have …

Member Avatar for vegaseat
0
103
Member Avatar for programmerC++

I need to write a program that will ust the rand() function that will generate pseudorandom numbers between 1 and 10. Using a loop,the program should prompt the user for a value until the correct number is enhtered.

0
25
Member Avatar for Hand

Hello I'm trying to make a window with Windows API. Whenever I run my application, the buttons look like Windows 98 buttons. How do I make the buttons look like XP buttons on Windows XP and Win7 buttons on Windows 7? My compiler is Mingw. [CODE]CreateWindowEx( 0, "BUTTON", "OK", WS_TABSTOP …

Member Avatar for Ancient Dragon
0
214
Member Avatar for Dimesh

Al salamo Alykom And hi.. Thank you for reading my topic ------------------------------ i want to do a program to do like these option Alt+f2 , Ctrl+r , Enter , Insert , Num Lock , Esc, Tab, (the start button) etc.... i need to call windows service to do these like …

Member Avatar for mike_2000_17
0
68
Member Avatar for Nulled

I have had horrible experiences with this forum, but I'm going to give it another go. What is the point of learning C++? I am only a beginner but what is the point? You learn all of C++, then what... you can make a console program whopee! I mean, when …

Member Avatar for Yojimbo_Beta
0
230
Member Avatar for renar

anyone Please give me an example code of sorting a records from Z-A. Can someone point me to some good tutorials so I can learn how to write and compile Turbo C program?

Member Avatar for Ancient Dragon
0
261
Member Avatar for mikenable

Hi all, I'm having a lot of difficulty trying to get this program to compile. I'm pretty new to C++, but what I've come up with so far makes logical sense to me, and I don't understand what the message "Request for member 'displayBoard' in 'game', which is of non-class …

Member Avatar for mike_2000_17
0
295
Member Avatar for alex-VX

hi I'm trying to create a player class for irrlicht the main game file calls it like this [CODE=c++] CPlayer cPlayer; player = cPlayer.Create();[/CODE] the thing is that the function must return the player so the function must be scene::IAnimatedMeshSceneNode*. player header [CODE=c++]#ifndef __C_Player_H_INCLUDED__ #define __C_Player_H_INCLUDED__ #include <irrlicht.h> using namespace …

Member Avatar for mike_2000_17
0
274
Member Avatar for yasirjani

I have made the treasure hunt game using 2D array. where '#' are the walls '*' is the border of the game. i want to place '@' as tresure at random postion between the spaces of 2D Array of size [20][20]. i know i have to use #include<time.h> time_t t; …

Member Avatar for yasirjani
0
108
Member Avatar for Kesarion

What I want to do is get my screen into a pixel array(array or rgb structs). I got a program running that loads a .bmp and does this but I want to skip the manual printscreen and loading and get it straight into an array. I searched a lot for …

Member Avatar for Mephesh
0
249
Member Avatar for crapgarden

Is this: A)[CODE]while (!isLegal(move, board))[/CODE] the same thing as: B)[CODE]while (isLegal(move,board) = !!)[/CODE] ?

Member Avatar for crapgarden
0
148
Member Avatar for madzam

I try to modify the below code by using the Arrays but unable to success , would someone help me please. Thanks [CODE]//Outputs the lowest, highest, and average of inputted temperatures //using an array structure #include <cstdlib> #include <iostream> #include <iomanip> using namespace std; int main() { //input variables float …

Member Avatar for Andreas5
0
162
Member Avatar for Andreas5

I finally got this exercise working and i just need someone to tell me im awesome. Or just some feedback or tips on what i can improve(probably alot:)).[QUOTE]Write a program which performs addition, subtraction, multiplication of matrices. The dimensions of both the matrices would be specified by the user (dynamic …

Member Avatar for Andreas5
0
126
Member Avatar for ichigo_cool

Okay. I created a program to create a character, and it uses a random number generator to initialize the Character classes strength and dexterity. Here's the character class constructor. Since the random number generator is based on time, both strength and dexterity have the same value when they're initialized. Is …

Member Avatar for mrnutty
0
240
Member Avatar for Qu4n7um

Well I'mm 14 years old and I'm very interested in learning some programing languages like c++ and so on . I don't know were to start at , or what to do i have no money to go buy books to learn , if any one could point me on …

Member Avatar for ichigo_cool
0
185
Member Avatar for aukeebler

What did I do wrong? It won't does not work for my choices... [CODE]#include <iostream> using namespace std; //function prototypes void displayMonthly (double[]); void displayTotal (double[]); int main() { //declare variables and array int choice = 0; double rainfall[12] = {0.0}; //get rainfall amounts for (int x = 0; x …

Member Avatar for PatrixCR
0
65
Member Avatar for computerdummy30

I am supposed to write a food menu program for this one summer class an i have been trying for the past 2 hours to figure it out. Directions: Write a program which allows the user to choose a beverage, sandwich and side order from a menu. After the choices …

Member Avatar for EngSara
0
89
Member Avatar for jiglypop

can anyone give me the source code of CAST 128 encryption algorithm written in c++ language?... I really need this for my thesis.

Member Avatar for mrnutty
0
62

The End.