51,592 Topics
![]() | |
Hi, I am also facing problems in converting a file.txt to a file.bin. Cheers, Dagiwal | |
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: … | |
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. | |
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 … | |
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 … | |
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 … | |
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. … | |
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, … | |
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 … | |
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? | |
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] … | |
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 … | |
#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]); } … | |
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 … | |
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 … | |
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 == … | |
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 … | |
[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] … | |
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> … | |
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 … | |
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. | |
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 … | |
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 … | |
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> … | |
When i handling my project exception occurs thread aborted. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Is it possible to print anything on screen in C or C++ without using main().If yes please explain how? | |
how do i output solution in array form into a file where it can then be copied. | |
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 … | |
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 … | |
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"); … | |
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 ? | |
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++ … | |
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 … | |
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 << … | |
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 … | |
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 … | |
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 … | |
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? | |
[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 … | |
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 … | |
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: " … | |
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 … | |
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 … |
The End.