51,593 Topics
![]() | |
hi, i need a stl list to read a vector. I have a vector "vec" and i want to create a stl list, where i can insert new points to the vector list and remove. | |
How do I convert text in upper case to lower case? :?: | |
Alright, I'm probably going to become the biggest pain in the butt here during the days to come, but please bear with me. [code=Cplusplus] #include <iostream> int Subtract(int first, int second) { std::cout << "In Subtract(), recieved " << first << " and " << second << "\n"; return (first … | |
Hey, I'm using SAMS teach yourself C++ in 21 days, and currently I am on Day 2, however, I've gotten a lot of errors whenever I compile even though I type out the examples exactly as they should be. I'm using Borland C++ Compiler. command line tools or something like … | |
Hii everyone !! Can anyone creat class delta.h for me ! Its about dirac delta function ( for 2d) . a simple one. Looking urgently. Regards, | |
Hello, all, I am pretty new to C++ and I need to write a program for calculating radio propagation path loss based on ray tracing, C++ is used for its faster processing rather than MATLAB. I have a question about passing 2D arrays between functions. One of the files looks … | |
I have an assignment due tomorrow and I've done a bit on it but I dont know how to do the rest. Can anyone help me please. Thanks. | |
Hello, this is my first time posting here so im sorry for doing anything wrong. Also I am kinda new at programming so bare with me. I am currently working on a function that basically reads a list of double values and assigns them to an array. But I ran … | |
We have a socket program written in standard c++. Could anyone tell me about what are the test cases i should do? | |
hi, where i could get the wsock32.lib and ws2_32.lib files. please help me | |
Hello ALL my first post! hope get a quick reply. I am doing a for loop to display a array of strings . my problem is formating and organizing the display . i use cout << and setw() , but the problem is : the names is different lengths is … | |
In visual c++ 2003 to visual c++ 2005 are there any major changes,Are there any Syntax changes i know there has to be,and would the 2005 version be worth the money? | |
[code=cplusplus] #include <iostream> using namespace std; int main( ) { float rand, cent, pounds, shillings; cout << "Enter Pounds " << endl; cin >> pounds; cout << "Enter Shillings " << endl; cin >> shillings; pounds =1; shillings =1; // enter amount while both pounds and shillings is not equal … | |
why the output do not produce the output after sorting....anybody knows how to do a selection sort code? [code=C++] #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <fstream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i, min,minat ; { for(i=0;i<3;i++) { minat=i; min=y[i]; if(min<y[i]) { … | |
MapFileAndCheckSum returns CHECKSUM_MAPVIEW_FAILURE(Could not map a view of the file) for file of size 758MB and above.For size upto 757MB it returns CHECKSUM_SUCCESS(normal behaviour).What is the meaning of this error?how to solve it?is there any file size limit to calculate checksum..............i want to calculate checksum upto 1.0GB/2.0GB | |
Hey Guys, I want to read from a file. And store the string in a string class array. Number of strings in the file is unknown. How could this be done? [code=C++] int n=0; while(!inFile2.eof()) { string tempStr = getWord(inFile2,n); if(tempStr.length() >=1) { wordCount++; } } inFile2.close(); inFile2.open(inFileName2.c_str()); string wordStr[wordCount]; … | |
I am going over some of my quizzes with questions I did not get right and was wondering if someone could help me w\ a few of them... What will the following code print to the screen: [code=c++] int num[15] = {3,2,8,7,1,5,6}; for (i=0; i <15; i+=3) { cout << … | |
BACKGROUND Your company is writing software for a new networking device and you have the task of managing the DNS storage and retrieval. DNS must translate between an Internet IP address such as 74.125.19.99 and the URI (in this case [url]www.google.com)[/url]. The networking device is not available so the code … | |
Hey everyone I've created this Tic Tac Toe program and it seems to work. I just wanted to know if somebody could check it out and see if there are eny errors in it or changes that i should make. The files to the program can be found below. Thanks … | |
Hey I had notice that my same problem was posted about 6 months ago but remained unsolved so I'm hoping that someone has the answer to my problem. I'm writing a tax program that does the following: For single people, the standard exemption is $4,000; for married people, the standard … | |
hi i used [B]GetModuleFileName[/B] and [B]GetModuleBaseName[/B] functions to return the path(directory) for the folder the project is in and the icon as well ...like this: [CODE]void CForm1::OnCommand1() { // TODO: Add your control notification handler code here CComVariant retval; // - "AutoDim" CString toto="ccc_ext"; CString app_path; CString Icon; char buffer2[2048]; … | |
I am trying to convert the std::string Number3 = "0.31" to a double in the code below. I have used a MessageBox to show the result. What happens is that double Convert is returning the value of: 0 What I have discovered is that if I instead would have written … | |
I need some help figuring out how to remove duplicates from an array. I've been working on this for a few days now, and every time I think I'm getting close, it just causes my program to shut down. I've gt a text file with city names in it and … | |
Firstly, in my own defence I should point out that I'm something of a novice at C++. Any help with the following would be gravelly appreciated. I have a C++ class that holds an internal array of ints. E.g: class MyClass { public: ....... //lots of methods here private: #define … | |
iam having problem in displaying the elements present in singly linkllist.here is my code below plz check the whole code and pointout the errors and give their solution plzzzzz. [CODE] #include<iostream.h> #include<conio.h> #include<stdlib.h> struct node { int data; node *ptr; }; node *first,*p,*nn; class list { public: void inslast(int); void … | |
Hey, am I correct in assuming that when you declare a function virtual in a prototype, it is illegal to use the virtual keyword again when you define the function? | |
I have a dfa program that gets DFA's properties from a text file and tries given string is accepted or rejected by dfa. I have some problems and can't get rid of this. Can anybody help? Here is my code. [code=cplusplus] #include <cstdlib> #include <fstream> #include <iostream> #include <string> #include … | |
Hi, I'm a Student in Vienna TU. May you help me , what's Linear Hashing,and how can i it with c++ use? I need to help on adding and searching. Ich have some Documents on Internet founded but i didn't understand them. How can i Buckets split and Which Array … | |
| |
hi all im new to this forum and i need some help with making a windows explorer in mfc. i dont expect that some1 makes one for me, but i dont know how to get started. my friend told me to make it with a treewiew and a listwiew control, … | |
hi. i'm trying to run my program but i get this error message... cannot convert âstd::stringâ to âstd::string*â for argument â1â to âvoid change(std::string*, int)â ...does anyone know what it means and where i am messing up? | |
Hello again, I'm trying to finish a function I am working on that reads data from a file set up like: itemID itemName pOrdered manufPrice sellingPrice itemID itemName pOrdered manufPrice sellingPrice ....and so on and puts the data into vectors this is what I've gotten so far and I'm not … | |
Can somebody tell me what is the difference between static class and static local variable in C++ ? u will be greatful if u explain it giving example thanking you | |
I'm having some trouble getting the shortened integer value of a fairly long double value. The double value in question is "1234567890123457024". When taking the int of it, such as: [CODE]int(value);[/CODE] This value is giving me a result of -2147483648, which is completely illogical due first to the fact that … | |
I have a text file that I want to tokenize(Separate the words) into a structure defined as [code] typedef struct { int fileno; char word[30]; int position; }storagefile[10000]; [/code] I want to be able to accesses each word, its position and the file it is in. Can anyone tell me … | |
Hi guys, I posted earlier today and had my problem resolved in record time, which was great as I had been struggling with the final elements of an assignment. Having received a preview automarking I found that I had one small error. Essentially, the read() function which follows takes an … | |
I am working on a project for school. I read the book but I'm still having trouble getting my program to function. We are working with multisets and are using 3 files. We have a multiset.h header file that is only supposed to contain the class definition. This was given … | |
This is my code to convert from binnary to octal ......what is the logic error in my code? [CODE]void main() { double base=2; char bin[10000]; int res,sum=0; cout<<"Enter the binnary number:"; cin>>bin; int len; len=strlen(bin); int coun=0; for(int i=0;i<len;i=i+3) { for(int j=0;j<3;j++) { res=bin[i]-'0'; sum=sum+res*(int) pow(base,j); } cout<<sum; } }[/CODE] | |
Hi, I have a question about the glut functions in opengl. For example, glutSolidTeapot (GLdouble size) Can anyone tell me if the rendered teapot can be textured and how? I applied textures on gluCylinder or gluSphere very easily : [code] GLUquadricObj *quadratic; // Storage For Our Quadratic Objects quadratic=gluNewQuadric(); // … | |
I am trying to switch this if...else statement to a Switch and I can not get the program to calculate. Please help? original if, else [code=cplusplus] #include <iostream> using std::cout; using std::cin; using std::endl; #include <iomanip> using std::setw; int main () { int x, total=21; cout << "Input Number for … | |
The problem is that i need to save in simple way the array of structure: [ICODE]struct gydytojas { int gydid, amzius, specialyb, telefonas, asmkod; String vardas[25]; String pavarde[35]; String adresas[50]; }; gydytojas gydmas[100];[/ICODE] This is the struct & array. Code: [ICODE]gydytojas pgyd; pgyd.vardas[25]=Edit21->Text; pgyd.pavarde[35]=Edit22->Text; pgyd.adresas[50]=Edit24->Text; pgyd.asmkod=StrToInt(Edit23->Text); pgyd.amzius=StrToInt(Edit27->Text); pgyd.gydid=StrToInt(Edit26->Text); pgyd.telefonas=StrToInt(Edit25->Text); pgyd.specialyb=ComboBox5->ItemIndex; … | |
![]() | Hi. The assignment is to implement a function using recursion. I can't use any loops whatsoever. The function takes in an array of doubles and the array size, and is supposed to return the position of the smallest element in the array. I've already written some code out for the … |
hello, i started learning c++ on my own from internet tutorials, so i know "the basics" (pointers, classes,...) but i think that i missed some "small" but important stuff. i've been looking for some books on amazon but i can't decide which one to get. i want something that is … | |
hi [B]Could someone please tell me how can i open a txt file with a press of a button (MFC)? [/B] not with the infile >>> i mean [B]open "text file"[/B] and another question if i may.... [B]Is there any way i can transform a cpp file to a txt … | |
Can anyone help me to convert from binnary to octal or hexadecimal in c++?? | |
I have some code like this: [code] vector<double> Saved; for(int i = 0; i<10; i++) { if(some condition on i) Saved.push_back(i); } [/code] Then I want to see what order the things were saved... so naturally I do cout << Saved.at(0) << endl << Saved.at(1) << endl; But to my … | |
Im wondering is it possible to change c code to assembly code if its not thanks but if it is can some one give me sum pointers | |
Can anybody please help me out in solving these problems in C++ Please reply to this thread ASAP! Thnx and regards acardiac Q.1. Write a program that accepts a nonnegative integer n and base b and display the digits of base-b representation (in reverse order) for each integer using a … | |
I am new to programmiing and I am starting to learn C++ but I have a question about the differences between programming C++ in windows and Linux? I ask because the book I have covers Windows but I alos want to learn any differences for linux as I have a … | |
In Unit1.h private: [ICODE] struct gydytojas { int gydid, amzius, specialyb, telefonas, asmkod; String vardas[25]; String pavarde[35]; String adresas[50]; }; gydytojas gydmas[100];[/ICODE] Now in Unit1.cpp im trying to do simple thing: [ICODE]void __fastcall TForm1::Button18Click(TObject *Sender) { gydytojas.vardas=Edit21->Text; gydytojas.pavarde=Edit22->Text; gydytojas.adresas=Edit24->Text; }[/ICODE] Getting these errors: [C++ Error] Unit1.cpp(172): E2108 Improper use of … |
The End.