49,761 Topics

Member Avatar for
Member Avatar for sanchyvil

Hi I want to know how to compile c++ codes using the command prompt in windows. In linux I do [code]g++ filename.cpp -o filename[/code] and run it using [code]./filename[/code] but for windows when I try this procedure in compiling i got an error message [quote]'g++' is not recognized as an …

Member Avatar for sanchyvil
0
345
Member Avatar for sunveer

i want to know what are the lower triangle and upper triangle mean in a matrix. For eg: if matrix is [ 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 ] then what will the lower triangle and upper triangle in this …

Member Avatar for ArkM
0
94
Member Avatar for luisvega

Hi, i have a problem with a vector. I declare a vector<char*> moves; in header. Code: [code] void LogView::init(){ int a = 0; while (LogFile.good()){ LogFile.getline(line, 6); moves.push_back(line); cout << "vector :"<< moves[a]<< endl; // here is OK a++; } moves.begin(); cout << "vektor :"<< moves[1]<< endl; // here is …

Member Avatar for luisvega
0
2K
Member Avatar for needhelp83

I am brand new at C++ and I have a programming assignment I have to do. I have to create a directed graph and perform a breadth-first traversal. I have to use an adjacency linked list implementation without using any existing libraries as Standard Template Library. Where do I begin? …

Member Avatar for needhelp83
0
138
Member Avatar for jetdreamer

hey guyz... i'm new here... i just want to know how i could end my program after a certain amount of time has passed by... I'm doing a "text twist" program where after 2.30minutes and if the user still has not guessed the correct answer, the program will end... i'm …

Member Avatar for unbeatable0
0
206
Member Avatar for anny**

hi! to everyone i have to make a program in c++ about factorial but the main problem is that the working of factorial must me shown for eg. 4!=4*3*2*1 like this on the output screen i had done upto here.... [code=cplusplus] #include <stdio.h> #include <conio.h> int main() { long float …

Member Avatar for sidatra79
0
260
Member Avatar for tatainti55

How can i run my program for a specific amount of time? And what is threading? I'm really new to C++ so i'd like n00b-friendly answers.

Member Avatar for Freaky_Chris
0
71
Member Avatar for Gary_nel

Hi Im new to the whole thing of programming and would like to write a C++ program to copy files from one drive to another, any help and suggestions on where to start? Any help with source code or pointers will be greatly appreciated. The OS the program is for …

Member Avatar for dougy83
0
131
Member Avatar for c230jif

My instructions are to write a program that assigns a five-word phrase with a single space between words to a user-defined string variable. It then outputs each word of the phrase separately. It must use the phrase "This is a test phrase" in the output, but also function properly when …

Member Avatar for Freaky_Chris
0
103
Member Avatar for rodeostar04

I would appreciate if anyone could help me with my program that calculates a hand of black jack. I know the way I created this program is probably not the most effective way but the only thing I seem to have problems with is getting the program to add 10 …

Member Avatar for Salem
0
123
Member Avatar for DeadJustice

I'm trying to read in the chars for a file in order to compare two text files. The problem is I can't seem to load space characters into my vectors. Any suggestions for me? [CODE] vector<char> cyphVector; char c; //fill vector with cypher file chars while( cyphFile.good() ){ cyphFile >> …

Member Avatar for VernonDozier
0
117
Member Avatar for rhoit

I am trying to built the program for handling polynomial... using linklist.... and so far i tried to implement in the Class to add the 2 polynomial using the operator overloading i got messed up with the some objects.... i have commented the parts please help..... [CODE] #include<iostream> using namespace …

Member Avatar for sarehu
0
140
Member Avatar for STUDENT#101

Hi could anyone tell me how to compile a three tear program in VC++. I am using g++ in school and so for practice at home I am using VC++ but I just can't get it to compile. thanks in advance.

Member Avatar for AceofSpades19
0
146
Member Avatar for DemonGal711

Ok, this is probably really stupid, but I'm lost and want someone else to say what they think. My teacher gave us an assignment and said that everything was in the file she sent us. So, I opened it and filled in all the coding as far as the comments …

Member Avatar for DemonGal711
0
80
Member Avatar for rodeostar04

I would appreciate if anyone could help me with my program that calculates a hand of black jack. I know the way I created this program is probably not the most effective way but the only thing I seem to have problems with is getting the program to add 10 …

0
164
Member Avatar for sinrtb

[code]return tree == NULL ? -1 : tree->height;[/code] I am trying to understand AVL trees but the one really nice example I found has a couple of methods defined like this. It is really pretty but I cannot read it? Can someone explain it to me? Or even just write …

Member Avatar for Narue
0
153
Member Avatar for freelancelote

Hi, is it possible to find out the size of an array created on the free store? thanks

Member Avatar for freelancelote
0
122
Member Avatar for patricksquare

//challenge,, fix this! [code=cplusplus] #include<stdio.h> #include<conio.h> void main() { struct job{ int at; int bt; }; struct job J[80], cpy[80], temp, cpy2[80]; int q, oh, jbn, x, y, z, t, ref=0, tt[80]; again: clrscr(); textcolor(YELLOW); gotoxy(20,5); cprintf("*** ROUND ROBIN WITH OVERHEAD ALGORITHM ***"); textcolor(10); gotoxy(5,7); cprintf("How many jobs do you …

Member Avatar for bhoot_jb
0
185
Member Avatar for san_sarangkar

Hi, Please help me doing Program for "Game of life". Here is the link for that: [url]http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life[/url]

Member Avatar for Freaky_Chris
0
195
Member Avatar for ChroNoS

I am develping a program to create an rtf file.The rtf file will be having images in it that will form a border around the page. Here is the code so far: [ICODE] #include "rtflib.h" #include "globals.h" #include "errors.h" void main() { // Set RTF document font and color table …

Member Avatar for Salem
0
162
Member Avatar for DanDaMan

Now, we all know that // makes a comment. But I have a question about the compiling of the program? Say you were to make a comment with a whole bunch of underscores to signify a different section of code. Does the amount of comments written in the source code …

Member Avatar for Denniz
0
332
Member Avatar for Asen

I'm a beginer in OpenGl. I downloaded glut 3.7.6 package but I didn't find glu.h, glaux.h, opengl.h, opengl32.h and gl.h in there. Where can I get it ? And if I've found it, how to set it so it can work well. I'm using VC++ 2008 Express. Please tell me …

Member Avatar for Denniz
0
342
Member Avatar for lomo

Write a complete function: DNA represented as a list of the alphabet letters A, C, G and T. How many times the sequence ACG occurs in a specific DNA string. (An example: If the list is CACGTTGCGTACGAA, then the number of occurrences of ACG will be 2.) Write function nrACGOccur. …

Member Avatar for lomo
0
249
Member Avatar for B_Acs

I am at the end of my first term in my C++ classes. I have managed well so far, but this program is completely frustrating me! Please help me figure what to do. Okay my assignment is kind of complicated for me.....here is what I am supposed to do, followed …

Member Avatar for STUDENT#101
0
212
Member Avatar for patricksquare

//can someone debug this program,,, thanks,,, [code=cplusplus] #include<stdio.h> #include<conio.h> #include<dos.h> #include<graphics.h> #include<stdlib.h> #define N 100 struct processors //PROCESS ATTRIBUTES// { float burst; float arrival; int priority; int num; }p[20],temp; struct ssss { int no; int xx; float arr; float burst; float ww; int pri; float wait; }process[N]; void main() { …

Member Avatar for stilllearning
0
157
Member Avatar for EBaller55

I am using Visual C++ 2005 with SP1 why does the following code generate a compiler error (error C2062: type 'int' unexpected)? [code] for(int i=0,int j=0;i<5;i++,j++){} [/code] Note the following two variations generate no compile error [code] int i,j; for(i=0,j=0;i<5;i++,j++){} [/code] [code] int j; for(int i=0,j=0;i<5;i++,j++){} [/code] Is this just …

Member Avatar for ArkM
0
249
Member Avatar for Linking_90

Hi, I was hoping that someone could give me some direction with how to solve this probem. The only info in this problem is word has N digits[only digits] and the numbers (output) should be in increasing order example 1469 or 468 The output should give all combinations in the …

Member Avatar for Linking_90
0
108
Member Avatar for MylesDBaker

Hello everyone, I am having a really difficult time getting this program off of the ground. I need to use a while loop to read data from a file and then read tonnage numbers corresponding to names read in from that file. The assignment looks something like this: [I]After watching …

Member Avatar for MylesDBaker
0
176
Member Avatar for justinlake888

what is a global variable? is that when the variables are located outside of int ()??

Member Avatar for dmanw100
0
124
Member Avatar for rishabh2011

hi everyone, I am making a textpad(basic textfile creator) in c++(console). It can create text files and then load them. But the problem is that when we load a file it can only show the data but not edit it or write further data. How do I code such that …

Member Avatar for Narue
0
104

The End.