51,592 Topics

Member Avatar for
Member Avatar for dagiwal
Member Avatar for dagiwal
0
33
Member Avatar for ashishchoure

hi , can anyone tell how to define AND operator by regular expression. Actually I want to return match if and only if 2 substrings will appear in string. For example i have string "[B]Successful Logon: User Name: Administrator Domain: Logon ID: (0x0,0x154CB759) Logon Type:2 Logon Process: Advapi Authentication Package: …

Member Avatar for ArkM
0
340
Member Avatar for omarzia88

i am new to c++ programing.can anyone tell me how to draw a line from a point to another point. if the coordinates of the points are given.in (x,y) please also tell me the header files which should be included in program. your comments will be highly appreciated.

Member Avatar for ddanbe
0
141
Member Avatar for Takafoo

int main( int argc, char *argv[] ) { ==> This function has over 60 lines. You need to split it into smaller functions Everytime I try to split it up I just cause errors (it compiles but locks up when I run it through the test system so I think …

Member Avatar for Takafoo
0
180
Member Avatar for Rickenbacker360

Hey, it looks like I'm stuck yet again. I've been working on this for awhile and I can't figure out why it's not working properly. Here's what I'm supposed to do: Create a function that simulates coin tossing. The function should have no input and no return value. When the …

Member Avatar for Somegamer
0
465
Member Avatar for theashman88

Hey I'm working on this program that tests you on a few questions. I enter the answer to one and it comes back and displays correct. For some reason though when the next question comes on it already comes back with a response saying the answer was incorrect. Here's the …

Member Avatar for theashman88
0
105
Member Avatar for goyofoyo

hey I have been looking up shapes in c++ but everyone talks about needing certain compilers and #includes but i don't have those compilers i have just been using the standard Microsoft visual studio at my school i think and my teacher has just asked us to create different shapes. …

Member Avatar for Ancient Dragon
0
121
Member Avatar for vinodmenon80

Hello I need some help with this question. I have attempted to write a segment of code for the Binary Search Trees in C++ code. Refer to the question below. Design and implement a program in C++ to solve the following problem. DESCRIPTION This program, which learns by asking questions, …

0
46
Member Avatar for DarthPJB

I'm continuing my project and found a strange error, I can think of ten thousand hacks to get around it and a few ways to fix it properly, but my curiousity is peeked. why Is AStringBufEx end result 18 characters long when the Lenth of the initial string is only …

Member Avatar for Ancient Dragon
0
106
Member Avatar for tonief

i am doing a project with visual c++ .In my project I have 2 forms . I want to do some calculation of some data of the form Form1, and i want the result of this calculation to write to a label of Form2. How to do this?

Member Avatar for tonief
0
88
Member Avatar for SallyJ

Can anyone lease tell me the value of k? I know it starts at 0 and loops backwards but I can't figure out where it terminates. I would really appreciate someone telling me the best way to figure this out so I can solve these problems in the future [code] …

Member Avatar for jesseb07
0
149
Member Avatar for shaggy7576

I do not understand what I am doing wrong... I need the second triangle to print the character the user inputs, but instead - and I have no clue as to why it is doing this - it prints the second triangle with smiley faces and other symbols. Any help …

Member Avatar for tux4life
0
137
Member Avatar for singhraghav

#include <cstdlib> #include <iostream> #include <fstream> #include <iomanip> using namespace std; struct Item { string name; int quantity; double unitPrice; string description; }; struct ItemTotal { string name; int quantity; double unitPrice; string description; }; void sort(Item list[], int n) { for(int i=0;i<n;i++) { for(int j=0;j<n-i-1;j++) if (list[j].description<list[j+1].description) swap(list[j],list[j+1]); } …

Member Avatar for mirfan00
-1
118
Member Avatar for Gewalop

Today I had this question in my exam: [CODE]write a program in C++ that covers the next points: -a company needs to enter its employees' data into the computer -each emplyee has (ID-Job Code-Division Code-Salary) -should be done using struct -Input/Output functions should be inside the struct -use the struct …

Member Avatar for mirfan00
0
148
Member Avatar for realmasa77

Hi, I have a problem with the tolower function. I use Netbeans 6.5 with GCC C++ on Ubuntu 64bit. The problem is, that I use nordic letters like å, ä and ö and the tolower function does not affect them at all. I have tried almost everything. I have tried …

Member Avatar for realmasa77
0
210
Member Avatar for anthony95

Hi guys, new to the forum so i hope that my first topic wont be full of errors. Anyway, i just started programing a couple of weeks ago in a program at my elementary school, and i have a couple of Q's. so this is my prog. [CODE] if(ima == …

Member Avatar for Gewalop
0
98
Member Avatar for manishgurnaney1

Hi all, I am using Visual Studio 2005, and developing some application. Currently i am facing one problem. I have written a class and declared some member variables in the class. In the constructor i am initializing the member variables to 0(member variable is int). But when i debugged the …

Member Avatar for ArkM
0
120
Member Avatar for inegames

[i](Im using VS C++ EE 2008)[/i] Hi people, i have had a strange problem today. Im currently programming something to do with Physics. I have searched the Internet already for the answer, including this site. The problem is: [i]error C2064: term does not evaluate to a function taking 1 arguments[/i] …

Member Avatar for tux4life
0
83
Member Avatar for fadia

hi guys.. i'm doing this program.. haven't finished it yet.. i'm not getting any errors but the program is not running correctly.. I dunnu y,, i did everything i had to and it says 1 succeeded with no warnings ! here is my code.. [CODE]#include <iostream> #include <fstream> #include <cstdlib> …

Member Avatar for fadia
0
166
Member Avatar for vahiddani

I have a text file with something like this in it: >ENSG00321 Gene_ch19 . . . . AATAGCGGTTAACATATTAATTAAACTAATGTATAGATATTATCCGCTTCCAGATTTATTATTTTGTAAA ATAGGCACAGTTCTTATCTGGTGTCACTTTATGCTTTTTTAATAGACGCCCAGCTCTACTCATGGCCAAG . . >ENSG00531 Gene_ch5 . . . . AAAGAAGCGTAGGCCCGCCATGCAGCGTAAAAAGGATAATGCGGAGCAGCGGTCCCCAAAGACTGATTTA TCAAAACTGTTTTCGCAGCAATTAACACACCCACCGACCAGTAACACCGCTGCAAGCAAGGCCACGGGCA . . I have some headers like (ENSG00321) too. I want to search in text files with header and then get …

Member Avatar for vahiddani
0
119
Member Avatar for touqra

Hi, I want to create a sequence of vector<double> each with a name + a number that goes from say 0 to 9. For example, how do I make a loop that creates10 vector<double> that goes by the name : vector_0, vector_1, ..., vector_9 ? Thanks.

Member Avatar for siddhant3s
0
115
Member Avatar for toolmanx

This is the hex output from a LARGE_INTEGER. "EA 00 0B 00 A1 00 00 00" On my machine a DWORD is read "00 0B 00 EA" How do you place the high 32 bits in the sequence? This leads me to the question of how to output this to …

Member Avatar for toolmanx
0
147
Member Avatar for madhavb

i have a following code: [code=cplusplus] #include <vector> using namespace std; class A { int t; int f; public: A(){}; }; class B { vector <A> a(10); int y; public: B(){}; }; int main(int a, char *b[]) { B c; } [/code] when I try to compile Iam getting the …

Member Avatar for ArkM
0
74
Member Avatar for brightsolar

my code so far...... [code=cplusplus] // ProjectDevelopment.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> // This libary allows standard input and output operations. #include <string> // strings are used as tempory storage - for the input to a text based file #include <vector> …

Member Avatar for brightsolar
0
238
Member Avatar for JakShelar
Member Avatar for khenz

hi guys, hopefully somebody can tell me what i'm doing wrong here: i'm trying to put together a copy constructor with this linked list class, but i just cannot get it to compile: [code] #ifndef LINKEDLIST_H #define LINKEDLIST_H //*************Include Statements************* using namespace std; // for cout //***********END Include Statements*********** class …

Member Avatar for ArkM
0
4K
Member Avatar for rosemarieD

Hi there, I have not looked at C++ code for 7 years and so need a bit of help with this. I basically need to have a dll installed on a client machine. This dll will be called from another program. The dll will need to open a customed browser …

Member Avatar for MrSpigot
0
89
Member Avatar for theashman88

Hi I am new to C++ and I'm trying to create a console program that quizzes you using some of my old quizzes. My only problem is when I get to questions where there are spaces between the word it messes up. Here's an example: string answer1 = "anything\0that\0has\0mass\0and\0occupies\0space"; string …

Member Avatar for theashman88
0
83
Member Avatar for ikj

i want to print the double base representation of a number ie if my number is 38 i shud get 36 + 2 and for 655 i shud get 648 + 6 + 1. here's my code: [CODE] unsigned long bs(unsigned long a[],unsigned long d, unsigned long beg, unsigned long …

1
58
Member Avatar for atman

Hello., I'm very new in C++, and I have a task to solve. I have a function: [CODE] void cio_display(const char *str, int row, int col, int len){ int i; cio_move(row, col); if(len<=0) { cio_putstr(str); } else{ for(i=0;i<len && str[i];i++) cio_putch(str[i]); for(;i<len;i++) cio_putch(' '); } [/CODE] here iss what i …

Member Avatar for ArkM
0
325
Member Avatar for lucky_multani

Ok what i'm trying to do in this program is first create an empty binary file of size 31 records. Records includes studid & gpa. and then I insert valid record into the binary file with h(k) = key% 29..and then read this binary file sequentially and write the records …

Member Avatar for Ancient Dragon
0
97
Member Avatar for Clockowl

Hey guys, Below code isn't working as I expect it to do. I expect it to read all params when 6 are given, buuuuuuuuuuuut it only reads one, the rest remains zero. It does enter the case, but the stringstream buf seems empty. What am I doing wrong? [code=cpp] #include …

Member Avatar for Clockowl
0
167
Member Avatar for rukunaditya

Is it possible to print anything on screen in C or C++ without using main().If yes please explain how?

Member Avatar for Narue
0
171
Member Avatar for selaog

how do i output solution in array form into a file where it can then be copied.

Member Avatar for jloundy
0
81
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
100
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
145
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
167
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
188
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
137
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 tux4life
0
278
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
147
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
563
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
96
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
115
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 tux4life
0
178
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
80
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
135

The End.