49,761 Topics
| |
Im new on this forum, i don`t really know if this should go hear or somewhere else. If i messed up well sry. Here is the problem im working for the first time in Turbo C, i have this proyect its a simple one but i still need help. The … | |
I have this DLL code, but I cannot access function. Where am I wrong? main.h [CODE=C++] #ifndef __MAIN_H__ #define __MAIN_H__ #include <windows.h> /* To use this exported function of dll, include this header * in your project. */ #ifdef BUILD_DLL #define DLL_EXPORT __declspec(dllexport) #else #define DLL_EXPORT __declspec(dllimport) #endif #ifdef __cplusplus … | |
Hello developers, I have been playing around with C++ and wxWidgets for a little time now and I think it is time to make a little useful program I am planning to make a CD ripper and Encoder (re-inverting the wheel purposely for learning) and I plan to use CDRip.dll … | |
Alright, my homework assignment is by using separate function definitions convert a temperature from Fahrenheit to Celcius. I've looked over the whole chapter, looked at the examples, and am having trouble somewhere. My program will only convert one temperature correctly to Celcius, which is 32, because it always returns a … | |
I was making a function to save info and it doesn't work. It's actually made up of 2 functions. I've eliminated my problems down to the second function and can't figure out what to do. Here is the function: [code=cplusplus] void DoFileSave(HWND hwnd) { OPENFILENAME ofn; char szFileName[MAX_PATH] = ""; … | |
Hi, for a class, I'm trying to implement a separate-chaining hash table stored in a vector that contains pointers to vectors where the keys will be stored. This is basically what I have: [CODE=c++] typedef vector<string> KeyChain; vector<KeyChain *> Table;[/CODE] The problem I'm having is when I want to access … | |
Please find the details of the code in attachment. I am new c++ student. Please let me know the fault. Regards, Shivi | |
what's wrong with this code, when i try to make the pyramid, it's always the same height of the pyramid. and somehow onumber always has the value of 20, WHY??!! Here is the code and I'll also include a picture of how it looks. [CODE=c++] #include <iostream> #include <iomanip> using … | |
Hey, [CODE] #include<iostream> #include<sstream> using namespace std; void manage(vector <string> scoreSheet) { int i; stringstream q; string z; for(i=0;i<scoreSheet.size();i++) { q<<scoreSheet[i]; q>>z; cout<<z<<endl; } } [/CODE] I expected this program to print the first word of each string in vector but is printing the first value over and over again,any … | |
Since the very first time I programmed c++ I've been trying to make a program that looks like this [CODE=c++] #include <iostream> using namespace std; int main() { char name; cout << "please type in your name >> "; cin >> name; if(name == 'kevin'){ cout << "hello bitch" << … | |
in c++ is it possible to have a maximum length of an input, say i am entering a number - is it possible just enforce a rule which says that only a 2 number integer can be entered? i.e 01, 02, 03, 10 20, 30 | |
[CODE]#include<iostream> #include<vector> #include<sstream> #include<algorithm> #include<cmath> #include<string> using namespace std; class ComboLength { public: int howLong(string moves) { vector<int> cc; int i,j,k=0; for(i=0;i<moves.size()-1;++i) { if(moves[i]==moves[i+1]) //Error k++; else cc.push_back(k); } return *max_element(cc.begin(),cc.end()); } }; [/CODE] I get a segementaion error in line if (moves[i]==moves[i+1]) any idea why? | |
Been trying to make a substitution cipher decrypter, but it isn't working especially good. so I thought I might could get some help with it. [code=c++] #include <iostream> #include <time.h> #include <windows.h> #include <iomanip.h> #include <string.h> using namespace std; int main() { bool EndThisShit(false); do { string input; cin >> … | |
hey guys, i would greatly appreciate it if u wood help me out to see whats wrong with my codes.... heres my question and heres my code...... DONT 4GET TO MAKE THE TEXT FILE TO RUN IT !!!! <input.txt, output.txt> <fp_in, fp_out> 1. Write a program to average real numbers … | |
[CODE=CPP]#include<iostream> #include<cstdio> #include<stack> using namespace std; bool opgreater(char ,char); bool opgreater(char a ,char b) { if(a=='^') return 1; else return((a=='*' || a== '/')>=(b=='*' || b=='/')); } int main() { int n; scanf("%d",&n); while (n--) { stack<char> exp; string initial; string final=""; int i=0; bool x; char temp,temp2; getline(cin,initial,'\n'); initial+='\0'; while(initial[i]!='\0') … | |
can anyone be specific with me on trying to figure out this error....I have been reaqding my book and looking all over the net trying to solve it but all i have left is these two errors!!!!!!! [code] #include <iostream> #include <string> #include <fstream> using namespace std; void add_Record(); void … | |
i am supposed to make 2 functions called find and they are supposed to find a character or string if they are similar when i do this progam gives me weird error: "use of search ambigious" "first declared as class search here. //main [code] #include <iostream> #include <cstdlib> using namespace … | |
Ok I am trying to write up a data system on C++ so that when i enter in 1-10 i can choose what i want to do....but I keep on getting errors...and the people i already entered in at the bottom (the void add_record) i dont think it correct because … | |
i.e. [code] class A { int x = 5; }; [/code] I saw a mailing list post from October 08 where a guy asked if this was going to be added. gcc 4.4 was released April 09, so I would assume it would have been added by then? I haven't … | |
Here we go again. As you can see, I have gotten much further. There are some elements however that I am unsure how to apply (i.e. bool tooMany). I haven't the slightest how to apply that. That is one snag that I have. Another, and the main one, is this: … | |
Haiiiiiiiiiiiii every one. i am totally new for VC++ i need a program on vc++ window application. i need to create a window, on that window i need 3 brouse button look like normal (file brouser) by using this button i need to get file path only.2 look like same … | |
Good, morning every one, in this nice forum; I solved a c++ solution but i don't understand the idea of the program, so i need help to understand the steps and the use of this program. Thankyou, all. | |
I am reading lines from a CSV and don't know what size it'll be, so I place read lines into a list of a structure "obs". Then I want to iterate through this list, put it into another list and then modify contents of the original list so that I … | |
I need to create two enumerations, one for the months in the year and the other for birthstones. Make a function named getBirthStone that returns the birthstone based on the month. Jan-garnet Feb-amethyst Mar-aquamarine Apr-diamond May-emerald June-pearl July-ruby Aug-peridot Sep-sapphire Oct-opal Nov-topaz Dec-turquoise Add code to call the function when … | |
I'm a beginner at c++ and I have to do a game of tic tac toe and I'm having problems with asking the player to play. Please help. ***************************************************** [code]#include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; ///function prototype void inttableArray(int [][3], int ); void displayArray (int [][3], int … | |
I've made a program in Visual Studio, it's a gui meant to control a camera and the functions of it that my problem rotate about are the functions to open and close the link to the camera. The program seems to run but when I run the program outside visual … | |
[code=c++] class C1{ public: C1(const C2& c){ //line 14 (works fine if i remove this constructor) //... } }; class C2{ public: C2(const C1& c){ //... } }; [/code] the compiler show me the following error: prova.cpp:14: error: expected ‘,’ or ‘...’ before ‘&’ token prova.cpp:14: error: ISO C++ forbids … | |
Hi there. I'm trying to write a program that will convert any number from base x to base y (bases 2-16). The user will also be able to convert hexadecimal numbers like 4BFA from base 16 to base 2.. which is 100101111111010. So far I've began to prompt the user … | |
I'm pulling my hair out on this one. It's been a while since I've specified a path for an ofstream. I just want a simple file called "abc.txt" in the C: folder and I want to write "abc" to it. Anyone see anything wrong? Thanks. [code] #include <fstream> using namespace … | |
Hello. I hope not to annoy you with such a question. I'd like to read cell data from specific columns within a spreadsheet. I'm trying to read data within the following format (from the .xls file I'm analyzing). [code] Wavelength (nm),Absorbance (AU),Std.Dev. 190,-0.333324432373047,0.187723662173536 191,-0.184257030487061,0.169325912513228 192,0.0989446640014648,0.243154257457939 193,-0.196856021881104,0.322099862671817 194,0.0530929565429688,0.250335468281439 195,0.146337985992432,0.301110817821903 196,0.0579915046691895,0.359937145256163 197,-0.309549331665039,0.293385120791022 … |
The End.