49,757 Topics

Member Avatar for
Member Avatar for coolbeanbob

I'm having trouble finding information on the implementation of "or". I want to use it in the do while loop below. [CODE] do { cout << "Please enter 1 for random or 0 for pseudorandom." << endl; //bool, 1 is TRUE, 0 False cin >> random; } while (random !0||!1);[/CODE]

Member Avatar for sfuo
0
92
Member Avatar for fullarmorzz

i have many questions to ask with regards to C++. In our programming class we do not use the "#include<iostream.h>" or something like that and MANY MORE! :D it is a lot different from ours anywhere i look. :D here is an example of our program. :D [CODE] #include<stdio.h> #include<conio.h> …

Member Avatar for Onlineshade
0
130
Member Avatar for goluman

[CODE] IpPairVec matches; blah blah other definitions for (unsigned int i = 0; i < matches.size(); ++i) { drawPoint(img1,matches[i].first); drawPoint(img2,matches[i].second); const int & w = img1->width; //.........etc etc etc } std::cout<< "Matches: " << matches.size(); //This returns a number after every iteration which is continuous. //I am able to redirect …

Member Avatar for Narue
0
178
Member Avatar for aastha takkar

program for tis structure given below: 1=1 1+2=3 1+2+3=6 1+2+3+4=10 ........ ............ ............. 1+2+3+4+5+6+7+8+9+10=55

Member Avatar for Onlineshade
-4
88
Member Avatar for 3YEARS

what is the source code having an output of 1 21 321 using for loop statement in microsoft visual c++? it must be right aligned

Member Avatar for Onlineshade
-6
150
Member Avatar for deanbrogada

Please help me to solve this problem..i need it today! Thank you. Sample input: Z Cozompuzutezer Sample output: Computer

Member Avatar for Onlineshade
-1
189
Member Avatar for uaremine
Member Avatar for thinkingofaname

hey im a new coder and the reason im getting into coding is to do some mathematical tests ive created several mathematical formulas that i want to turn into a program i dont have the c++ know how to do this though. what im wondering is if anyone would like …

Member Avatar for Onlineshade
0
132
Member Avatar for techy23

[I][B]Please help me with star patterns or anything with a patterns like 'x' in C++. What ois the logic behind it[/I]. [/B] x x ******** xx xx ******* xxx xxx ***** xxxx xxxx *** xxxxx xxxxx ** [B][I]these might look easy, but i dont get the logic. please give detailed …

Member Avatar for Onlineshade
-1
102
Member Avatar for rajatchak

[CODE] #include<iostream> #include<windows.h> #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<fstream> #include<string.h> #include<windows.h> #include<fstream.h> #include<ctime> void checking(); void display(double); enum check{correct,incorrect}; class words { public: char word[20]; check cword; check cchar[20]; }; void main() { ifstream fin("Book.txt"); char ch; char wrd[20]; time_t start,end; double dif; cout<<"\n Enter the text below. Press 0 to finish …

Member Avatar for rajatchak
0
1K
Member Avatar for ron_e

Error directive : Must use STDCOMP.H This error come out when I try to link various .cpp files and a .h file with borland 5.5 any help ???

Member Avatar for Ancient Dragon
0
619
Member Avatar for Jiggle

I'm currently reading through a C++ tutorial, and for the most part it's going great - but I am slightly confused about the purpose of 'interface classes', and abstract classes. I don't understand why it is preferable to create a purely virtual base class, only to overwrite all of the …

Member Avatar for Sky Diploma
0
128
Member Avatar for Leppie

I am creating an RPG with an in built clock, incrementing after every four moves. The clock is accessible by typing "time" to display the game time. I've also put in "sleep" which increments game time by 4 hours (time and sleep as inputs will not increment game time). It …

Member Avatar for Sky Diploma
0
156
Member Avatar for SCass2010

Hi everyone (again!!) Sorry for all the questions, but I was wondering if anyone could help me a bit.... I jknow a bit about passing command line parameters when running a C++ app on Ubuntu through the terminal. At the minute I have the app either running with no command …

Member Avatar for SCass2010
0
247
Member Avatar for cppdeveloper

[size="4"][size="3"][font="Tahoma"]These are just some of the Arrays sizes i've used, many of them are inside a loop. [CODE] int ss[80000]={0}; char pres[64000]; int ith[4096][16]={0},ich[4096]={0},pres2[2500][16]={0}; int slf[4096][16]={0},slr[4096]={0},rh=0,crs[4096]={0},cri=0,moo=0,nb=0; int qlf[4096][16]={0},wlf[4096][16]={0},kd=0; int jlf[4096][16]={0},jlr[4096]={0},jrs[4096]={0},jri=0; int klf[4096][16]={0},klr[4096]={0},krs[1204]={0},kri=0; int vlf[4096][16]={0},vlr[4096]={0},vrs[4096]={0},vri=0; int plf[4096][16]={0},plr[4096]={0},prs[4096]={0},pri=0; [/CODE] 80% of the time my program runs properly but every other time it …

Member Avatar for raptr_dflo
0
163
Member Avatar for nuclear

I was watching a tutorial that says that we first need to check if any direction key was pressed, and only then we check which key was pressed, like this: [CODE]while( running == true ) { while( SDL_PollEvent(&event) ) { if ( event.type == SDL_KEYDOWN ) //checking if any key …

Member Avatar for gusano79
0
280
Member Avatar for dionisov

Hello, I'm currently trying to figure out how I can get the information in ASE file and put it in my own arrays. Heres an example of ASCII scene export: [CODE]*3DSMAX_ASCIIEXPORT 200 *COMMENT "AsciiExport Version 2,00 - Fri Aug 26 13:58:27 2011" *SCENE { *SCENE_FILENAME "" *SCENE_FIRSTFRAME 0 *SCENE_LASTFRAME 100 …

Member Avatar for dionisov
0
593
Member Avatar for programg

Need help with this problem Required a function of int string(char* s, int size), which returns 1 if the sequence of characters pointed to by sequence consists of only the characters A, B, and C, and otherwise returns 0. size is the size of array input by user.

Member Avatar for Cross213
0
90
Member Avatar for supriya badam
Member Avatar for AndreiM

Hello there! First off, I'm just in school, 10th grade (second year of computer science), so I am not very advanced. I was wondering...How can I write a simple program that does combinations, in a certain way? Let's say I have 5 buttons. I want all combinations of pressed and …

Member Avatar for AndreiM
0
134
Member Avatar for nalasimbha

Hello, I have a question regarding downcasting of base class pointers. I am providing a sample class design which is similar to my program. [CODE] class A { protected: double num1; public: virtual void fn1() = 0; }; class B:public class A { protected: double num2; public: virtual void fn1(); …

Member Avatar for jinhao
0
371
Member Avatar for winecoding

I have a csv file or an excel file, which is a mix of numerical values and text information. For instance 1 Paragraph1 2 Paragraph2 In this file, the cell of (first row, first column) has a numerical value of 1; on the other hand, the cell of (first row, …

Member Avatar for WaltP
0
111
Member Avatar for dizlo
Member Avatar for mike_2000_17
0
144
Member Avatar for David321

I'm currently using the fourth edition of Deitels "C++ How to Program", which I borrowed from the library. I'm interested in buying a copy of the textbook myself. If I buy a fifth/sixth edition will there be things that will be confusing? For example, are the concepts introduced in a …

Member Avatar for David321
0
116
Member Avatar for sadsdw

Hi friends, I wrote a simple code to write in different files but I don't know where I made mistake. The function is writing the first file and after writing everything in the second file, not in the next files 3,4, 5. Can anyone help me please? Thanks a lot! …

Member Avatar for sadsdw
0
103
Member Avatar for replicant.nz

[url]http://www.security.org.sg/code/loadexe.html[/url] [url]http://pastebin.com/QFHASx75[/url] I've compiled this but can't get it to work properly, It runs fine and shows no errors in the console console output: [code]C:\~\~\Documents\Visual Studio 2010\Projects\loadEXE\Debug>loadEXE.exe AcceleratedC++Exe_2-0.exe Original EXE loaded (PID = 4068). Original Base Addr = 110000, Size = 29000 Unmapped and Allocated Mem for New EXE at …

Member Avatar for Satyrn
0
237
Member Avatar for Gaving30

Hi All, First time asking so go easy :-) I am doing c++ a few weeks now, i am doing questions in Project Euler to hopefully improve my coding, But as you will prob see below i am still very new and "Nieve"... Question is: The prime factors of 13195 …

Member Avatar for TrustyTony
0
439
Member Avatar for YAMNA MIDHAT

I want to make a text editor in c or c++ with features like bold,italic,underline,save as ,save,open,font size,font colour, font type,alingment(left,right,mid),cut,copy,paste.......... Plz i need the code if any one can help me plzzzzzzzzzz,,,,,,,,,,,

Member Avatar for YAMNA MIDHAT
-5
4K
Member Avatar for robdb

can someone tell me how this program works? I'm trying to learning C++ by reading some examples, and this one is one of them. [CODE]#include <iostream> #include <string> using namespace std; class Vigenere { public: string key; Vigenere(string key) { for(int i = 0; i < key.size(); ++i) { if(key[i] …

Member Avatar for gusano79
-1
2K
Member Avatar for coolbeanbob

Hello, I am trying to figure out how to get the rand() function to include 0. [CODE]int value = rand() % range + 1;[/CODE] No matter what I set range to be, the lower bound is always 1.

Member Avatar for Fbody
0
174

The End.