51,593 Topics
![]() | |
Hmm. I am converting a string into an int. [code=c++] string sum(string line) { string first; string last; string scores; string output; istringstream lineStream(line); lineStream >> last; lineStream >> first; for (int i = 0; i < 10; i++) { string getScores = "0 "; lineStream >> getScores; scores += … | |
hi i have problem i have to devolpe a program ,that can't use a printf ,but i have to display a string. is this works int a = printf("How is this\n"); main() { int b; } This will work in C++ wht abt c? AND one more [B]HOW sizeof()[/B] [B]implemented … | |
Hi, I've been trying to get this to work for the past two hours and can't figure out why this run-time error is happening. The code is as follows: [code=cplusplus] #include<queue> #include<stack> #include<iostream> usingnamespace std; int main() { stack<char,deque<char,allocator<char> > > s; queue<char,deque<char,allocator<char> > > q; char ch; int count … | |
First of all im a java programmer and im porting to c\c++. I have no knowledge of c\c++. Because my work requires me to learn c\c++. in just 1 week they want me to code intermediate stuff. I wasnt able to comply 100% to their requirments but at least i … | |
hello there, im new in c++...i just want to know how to compare a string to null like: [code] string x; cin >> x; if(x==NULL){ cout << "null"; } [/code] im using this one, [b] if(&x==0) [/b]...but it does'nt work... this is what my mentor told me to do... help..thanks | |
Is there a member function in the string class to put two strings together at a certain index? For example... if i took these two strings... city = Memphis and state = Tennessee to put them together like this [code=c++] Memphis Tennessee [/code] The city would start at index 0 … | |
Hi, I have to port a code onto an ARM processor... what is the most commonly used methods for optimizing C code? I`ve read abt limiting the number of parameters in a function, pass values by refernce in argunments rather than by value, and trying to avoid global variables... My … | |
[code=language] #include <iostream.h> char first[ 20 ]; char middle[ 20 ]; char last[ 20 ]; main() { cout << "What is your name ScumBag? "; cin >> first >> "\n" >> middle >> "\n" >> last; return 0; } [/code] | |
Develop a C++ program that will determine whether a department-store customer has ex-ceeded the credit limit on a charge account. For each customer, the following facts are available: a. account number (an integer) b. balance at the beginning of the month c. total of all items charged by this customer … | |
i'm developing a c++ program here and also i'm nwe to c++. i have been given a program that has to print integers from 0-10 with their squares and cubes in a table form. but the problem is i'm only allowed to use if statement onyl to do this program.well … | |
[B][COLOR=darkorchid] [/COLOR][/B] [B][COLOR=darkorchid]hi ^^/[/COLOR][/B] [B][COLOR=darkorchid]i'm new here ,, & i have some questions :pretty: ,,[/COLOR][/B] [B][COLOR=darkorchid]mmm,, it may sound easy to u ,, but what can i do i'm just a beginner:icon_sad: ..[/COLOR][/B] [B][COLOR=darkorchid][/COLOR][/B] [B][COLOR=darkorchid]can some1 explain to me how to do this program using 2-dimentional arreys ?[/COLOR][/B] [B][COLOR=darkorchid]pls dont … | |
Hello all, I am a mainframe programmer for about 20 years. Its time to expand my knowledge to more languages. I was hoping someone could direct me to some good online C++ courses I could take. hanks in advance to all that reply.. Regards Warren | |
![]() | i tried to run a graphics program in my borland c++ 5.02 compiler.. i opened a new project, changed the platform to DOS(Standard) mode... check marked the BGI option.. and added my program as a new node to my project.. and compiled it successfully but when i try to execute … |
hello there, i have no idea how to check if a directory in linux already exist, can someone point me an example..pls..thanks | |
hello there, i have here a program(linux based) that creates a directory then transfer files to that said directory...the problem is, im using strcat to join my bash script commands to the users inputs..now, i have a loop that concatenates the commands... is there a way that a concatenation will … | |
[COLOR=#000000]The Program. [/COLOR] [COLOR=#000000]You have been asked to solve a problem for an old gameplayer. She has purchased a new game. It is a sort of Solitaire. This suits the old gameplayer as she has no friends so a game played alone is ideal. [/COLOR] [COLOR=#000000]The game is played on … | |
Hi everyone, This is my first post, so a brief introduction: I am a first year Engineering student in Trinity College Dublin. We have a fairly intensive workload including Maths, Physics, Chemistry, Mechanics, Logic, Graphics, and of-course Computer Science. The CS part of the course is easily my favourite and … | |
hello there, im having trouble with the system() function...as much as possible, i would like my program to be dynamic...i created a program that will make an iso file...it will ask the user to input the directory that he would like to compress...the problem is, how do i append this … | |
HI guys, I am taking C++ and I'm suppose to write this program where it asks the user to input a grade that they recieved in their exam . The grade is an interger from 0 to 100. Basicly the program should convert the numeric grade to a letter grade. … | |
Hi again everyone. I'm having a problem with some code I am writing. I need to take an input file change what is on it, then print out to the screen. What I want to change in the file is re-formatting it so that there is Last name First name … | |
hello there...uhmmm, im having problems with getting the file and storing them...like for example, you ask the user to input a file then that file will be stored...how do you get that file, and where do you store them?? thanks | |
Sry guys..havin troubl figurin out sum of this posting stuff..... OK guys, Im writing this [URL="http://www.daniweb.com/techtalkforums/thread77798.html#"]game[/URL], and i can't seem to figure out one thing. This is an extra fun thing that one of my Profs suggested. If i get it working like i want..he may give me extra credit. … | |
Hello! I downloaded software called Xloops to evaluate integrals I'm working with. It comes with some example programs to show how the libraries work, but I can't seem to get them compiling consistently. Here is one program (the important part is the first 12 lines): [code=c++] #include <iostream> #include "xloops.h" … | |
Respected Sirs/madam, Please Explain Me The Code Of Palindrome Programme And Programme For Searching Character In String . I Shall Be Grateful If You Mail The Code Of These C++ Programmes With Explanations . Your' S Obediently Krishu | |
im trying to pull a bitmap from a file and read off each pixel value (preferably RGB (0-256) but hex will work fine as well). i am very unfamiliar with bitmap coding and was wondering if someone could give me some C++ functions that would be useful. thank you. | |
hello there...im new in c++, i need your help with this one...i want to create a program that will create an .ISO image file. the user will be asked to input all the files that he wants to compress..i just want to know what topic in c++ i will study … | |
Hi to one and all, this is satya, I few doubts in c those are, All are linux based, 1) How we can convert physical address to virtual adress and vice-versa,for this any linux system call. 2)How a float will store in binary format. 3)what the use of constant volataile. | |
OK guys, Im writing this game, and i can't seem to figure out one thing. This is an extra fun thing that one of my Profs suggested. If i get it working like i want..he may give me extra credit. So heres the problem. This is a game where 2 … | |
hi, I want to make a chat program using c++. Can you give me any site where i could find the concepts in building chat program? I will make a chat program similar to YahooMessenger. | |
Can someone please tell me what to do with a library object file in visual c++ express? Another programmer developed a set of classes with header files but there are no .cpp files. There is a .dll and a .def along with a library object file. The developer told me … | |
I just started mess with Memory at c++ so i am very confused now, and this is why i am asking 3 questions that made me confuse so much. 1. Look at this: char *str = "Literal String"; Here we are creating a char pointer called str then we are … | |
hi, I have been trying to get into C++ for a while now. My background is in VB.net. I do have experience programming with C++ (and some C) through my classes, but nothing complex... the biggest thing that I seem to be having trouble comprehending is how data access is … | |
I have many of them :) At this point I'm looking for help with a specific idea I know is possible, I just have no idea how to pull it off first some code: [code] cout << "Would you like to continue? (Y/N); method1(); [/code] [code] while(someSentinal) { //Do stuff … | |
hello all; im kinda new to this kinda stuff was just wondering if someone could please help me out with the following parts i have there ... my compiler isnt really letting me draw the board it keeps on insisiting that i have invalid types of data.. also i cant … | |
Does anyone here knows how to make application in c++ using the wxwidgets for i am having trouble in getting the value in the wxTextCtrl.Could you please help me on how to get the value on the wxTextCtrl and display it in an another textctrl....pls..help.. your help is highly appreciated!!!!! | |
| |
Hi, I'm fairly new to c++ and I'm having some trouble getting this to work as a function. Here's the error I get: error C2447: '{' : missing function header (old-style formal list?) I can work through the minor troubleshooting of basic syntax I just don't get how to call … | |
Basically I have to take in N and bring it to power of K so N^K i have the c++ i have the basic assembly but something is wrong the math doesn't come out right .386p .model flat .code _func proc near push ebp mov ebp, esp mov eax, [ebp+12] … | |
Hi! I hope some one is familiar with pascal. I've been trying to translate this code into c++ for quite a while now... And frankly I've given up hope of solving it. It's supposed to invert an integer from binary data it reads from a file into normal characters or … | |
I need help trying to compile and test this code, but I keep getting the error: template is incomplete, can not parse field. Here is my code: [code] #include<iostream> #include<iterator> #include<vector> #include<algorithm> using namespace std; template <class T> class my_istream_iterator { public: typedef charT char_type; typedef traitsT traits_type; typedef basic_istream<charT, … | |
Hi guys I'm working on a small portion of a larger program here that will accept lines of text and based on the first word in each line needs to conditionally branch...I am using the tolower() function to make the words lowercase and then I test them in an if … ![]() | |
I design a form in C++ Builder 2006, and i want to handle `WM_NCPAINT` message by my own function (`void RedrawCaption(TMessage & msg);`). After handle this message i have to call the default message handler of the form. But i fail to find out the default handling function. Could you … | |
im compiling a basic sorting algorithm that utilizies POSIX threads (pthreads) .... everything was compiling fine, until i put the thread implementation in .... all of a sudden, it gives me this: [code]-bash-2.05b$ gcc project4a.c -lpthreads project4a.c: In function `main': project4a.c:32: subscripted value is neither array nor pointer project4a.c:33: subscripted … | |
I have a daemon I'm working on that seems to bomb out in the middle of strcmp, WAY down in the bowels of the ODBC library. It would run for hours, then just mysteriously quit (well, as mysteriously as a SIGSEGV can be)- classic memory corruption symptom. So, I built … | |
i cant figure out how to graph x and y positions using 2 d array i managed to tabulate the results though..does anyone have any ideas? ![]() | |
I hope this helps for some of those wanting to create a basic menu. [code] #include <iostream> #include <dos.h> #include <windows.h> #include <string.h> #include <fstream> using namespace std; int main() { ofstream OutFile("OutFile.dat"); top: system("cls"); //Opening first prompt to introduce software designer system("title SAT-FAST"); system("Color 6"); cout<<" Created and Developed … | |
Hello Geeks! I have tried real hard trying to figure out the solution for why the getchar() and fputs() arent working in my program. I have already wasted so much time thinking and debugging about it and here I am after registering wid DANIWEB for the first time. I will … | |
Hi, I have created an on-the-side project to test some code which I hope to merge with my main program, however I've noticed that the output generated varies between two compilers (VC++ 2005 Express and Dev-C++). Since I am doing the project in VC++, it's output has had me scratching … | |
Could you tell me the mean of this code? [CODE] while(1) { // do something [/CODE] thanks! |
The End.