49,757 Topics

Member Avatar for
Member Avatar for mini programmer

Hi to all I have ADT of the AVL TREE and I need to add some the function to create tree to family. I have logic error in my code.. my code work to find relationship between two nodes (e.g: a parent of b,a and b are Sibling and so …

0
99
Member Avatar for mostermand

I have been testing a C++ based SDK and now i have a few questions for you that i hope you will answer . 1. When passing objects between each other is it preffered to use references if not what then? 2. Is it good or bad to make a …

Member Avatar for mostermand
0
142
Member Avatar for FaMu

Hi I have the following function which read ASCII characters(separated by space) from a file and I want to print it out to the screen contents of the data.txt file are like this 70 97 104 97 100 [code=c++] void decode() { string str; string instr; ifstream inFile; cout<<endl; inFile.open("data.txt"); …

Member Avatar for FaMu
0
164
Member Avatar for ithelp

I get only Java,J2EE,.NET job requirements these days , just wondering how C/C++ jobs have vanished from it job market . Are you also observing the same in your country ?

Member Avatar for Ene Uran
0
187
Member Avatar for phoenix_dwarf

The question: Get an integer value from the user to draw a cheassboard on the screen of that specified size. The black squares must be * and with any other chessboard there must always be a *(black square) in the bottom left corner. PLEASE NOTE: I'm very new to c++ …

Member Avatar for phoenix_dwarf
0
136
Member Avatar for wnrqkflwnrqkfl

Hello all, I am trying to read in the text file but it seems my code cannot read the text file which has tab space eg Mine only reads Sydney NewYork 1300 but It should read Sydney New York 1300 ( and the space between city name or number can …

Member Avatar for Dave Sinkula
0
3K
Member Avatar for kylcrow

Here is some code that I am trying to use. Why wouldn't this work the way I am assuming it should? here is a sample of vector<string> mine: *** *2* *1* so mine[1][1] = 2. [CODE=C++] // In a function that has passed in vector<string> &mine int dist[2000][100]; cout << …

Member Avatar for kylcrow
0
135
Member Avatar for crazyluigi

greatings to all of you!! I start learning c++ and i getting a problem with the [B]ENTER[/B] key... i want to ignore it and i just know how. [code] do{ printf("\n"); printf(" A : Quadrado\n "); printf("B : Rectangulo \n"); printf(" C : Circulo\n"); printf(" D : Triangulo\n"); printf(" E …

Member Avatar for crazyluigi
0
1K
Member Avatar for wnrqkflwnrqkfl

Hello all, I was building a program which needs to output in alphabetical order and i got stuck. (Program reads in text file and then do dijkstra's shortest path) My output is fine except that it is not in alphabetical order.... can anyone help me with this??? here is my …

Member Avatar for mvmalderen
0
274
Member Avatar for pxndx

well i´m taking some classes on C++, but i have no idea what namespacing std means or why i use getch(); an to return 0 how do i know which libary is which like the iostream or conio and how do you make your program finish and restart agian i …

Member Avatar for ArkM
0
142
Member Avatar for rtwister

does anyone know how to make a c++ program that types what you tell it to in to a text field on a website. for example: cout << "Hello"; how do you get this to print in to a text field on a website?

Member Avatar for William Hemsworth
0
553
Member Avatar for n3r3d

[CODE]void slova(string datoteka){ ifstream coban; coban.open(datoteka.c_str()); string polje[200]; string linija; int brojac=0; while(!coban.eof()){ getline(coban,linija); polje[brojac]=linija; brojac++; } string rec=polje[1]; int brojac2=0; for(int i=0;i<rec.length();i++){brojac2++;} cout<<brojac2<<endl; if(rec[0]==rec[brojac2]){cout<<"same letters"<<endl;} else{cout<<"letters are not same"<<endl;} }[/CODE] This is my code, it should test if 1st and last letter in string are same, but i can't …

Member Avatar for n3r3d
0
94
Member Avatar for Brandon515

hey guys umm this might seem really stupid but for reasons i would rather leave unsaid i want to make an encryption program and by this i mean a program that will turn a string into numbers and funnel into a file then when selected take the contents of the …

Member Avatar for Brandon515
0
113
Member Avatar for shuda009

In my previous posts, I asked about how to transform a part of a string into an integer. Narue kindly gave me the answer and I've implemented it into my code. Here is my code: [CODE] int main() { string line; string cmd; while (cmd!="quit") { cout << "Command: " …

Member Avatar for mvmalderen
0
175
Member Avatar for TheSeraph

Ok, searched a bit and found a few relevant posts, but they didn't directly address my problem, so here I am... Basically, I'm trying to write a program that will, hopefully, do the following things in sequential order: 1) Accept certain login credentials (user test, password 1234) and auto-login to …

Member Avatar for TheSeraph
0
79
Member Avatar for real_castilla

hi all, I have a binary file, then I try to read them and show the value to the screen, but what I got is always -13108. I don't know why. Here is my code [code] #include <iostream> #include <fstream> using namespace std; void main() { std::fstream f_in, f_out; short …

Member Avatar for real_castilla
0
130
Member Avatar for richymac

im trying to write a cg pixel shader and just want to generate a random number too offset the colour of a pixel is there something i need to include, i tried using rand() but gave me errors thanks in advance

Member Avatar for Stinomus
0
320
Member Avatar for Usura

hey i have a int **grid; pointer which should read from a txt file a grid which is made up for 0's and 1's, how would i make my grid pointer only read in 1 int for each index of grid[0][i]? txt file contains height and weight of the grid …

Member Avatar for Ancient Dragon
0
81
Member Avatar for vishy_85

hello all , im trying to read a text file and display its contents. While i got the code running and the output was displayed perfectly for sometime , i started getting Abort(core dump) error . Am i missing something here ? im using HP-UX. [code] #include <iostream.h> #include <fstream.h> …

Member Avatar for Stinomus
0
148
Member Avatar for saalvi

Problem Statement: Dynamic memory allocation/reallocation of an Integer array. Detailed Description: Write a program in which you have to: 1. Dynamically allocate an array of integers. 2. Take array size as input from user and allocate memory according to this size. 3. Take values of array elements as an input …

Member Avatar for MariaERamos
0
210
Member Avatar for FaMu

Hi I have the following code which is my project I completed section 1 and 2 but it doesn't work could you help figuring why? [CODE=c++] #include<iostream> #include<string> using namespace std; void count(); void reverse(); void encode(); void decode(); int selection; int main() { cout<<"******************"<<endl; cout<<"Welcome To Project"<<endl; cout<<"******************"<<endl; cout<<endl; …

Member Avatar for FaMu
0
206
Member Avatar for shuda009

Heres a snippet of my code: [code=cplusplus] int main(); { string cmd1; int cmd2; cout << "Command: " << flush; cin >> cmd1; if (cmd1 == "playlist") { cin >> cmd2; if (cmd2==XXXXXX) { cout << "Illegal command: " << cmd1 << endl; } else cmdPlaylist(cmd2); } return 0; } …

Member Avatar for shuda009
0
450
Member Avatar for vs.vaidyanathan

I hav two points on the ground at different distances from me . I have the angle swept by my eyes in going from one point to the other. But a camera performs this action by first panning(moving horizontally ) and then tilting(vertical depression or elevation.) Is there a formula …

Member Avatar for VernonDozier
0
86
Member Avatar for Bezelis

Hello to all. On the internet I often find many C/C++ source files together with a makefile with extension *.in. These files should be used to generate a configuration script with GNU Autoconf. I don't know how to use GNU Autoconf. Do you know how I can compile the source …

0
78
Member Avatar for Raven6666

Ok, well I have an assignment, and I'll be needing some help. First off, I need help on counting the number of from a text file. I'm not sure if I should do a loop eg : [code]for (j=0, j<26; j++)[/code] or there may be an easier way. I have …

Member Avatar for Raven6666
0
134
Member Avatar for vs.vaidyanathan

can anyone please help me with converting from image to world coordinates? Once i get the world coordinates how do i make use of the Z coordinate to show the 3d? thanks in advance:)

Member Avatar for vs.vaidyanathan
0
284
Member Avatar for shuda009

I'm writing a program where I have a variety of input commands. Lets say here are my three commands: info playlist # quit info - gives me information quit - terminates the program The problem: playlist # - The command playlist # means I need to cout a number of …

Member Avatar for jencas
0
100
Member Avatar for wnrqkflwnrqkfl

Hi all, I am trying to reading stuffs from the text file, i don't know y but program can't read off the tab space eg. it reads Hi HappyDay 325 but it can't read Hi Happy Day 325 like where we used more than one spacing for one word or …

Member Avatar for jencas
0
73
Member Avatar for zack.walters

what is array of void and why am I getting it in the following program? I finally have the first part done where I can loop the input. However, I cannot figure out what this array of void is. I'm getting "declaration of 'lastname' as array of void" in lines …

Member Avatar for ArkM
0
136
Member Avatar for Abbygail

Hey guys, I have been learning c++ while working with memory management i seem to have gotten stuck, There are 2 classes Stack and Queue the stack works on the LIFO principle (last in first out) and the queue the opposite FIFO (first in first out). Now the program runs …

Member Avatar for ArkM
0
222

The End.