49,761 Topics

Member Avatar for
Member Avatar for baconswife

Hello, I'm new here and not quite sure what it means by wrapping code in code tags so for my future posts can someone let me know how this should have been formatted so it would be a correct post? My question is I have a program I am writing …

Member Avatar for Grn Xtrm
0
126
Member Avatar for Bri426

Hey everyone :) I'm writing a program for my class that has the user input 5 test scores and then from the inputted numbers, return the letter grade. I've begun writing the LetterGrade function, but it's not working. I'm getting a strange array of numbers/letters instead of the actual letter …

Member Avatar for mrnutty
0
143
Member Avatar for fukki

Those some parts of my program. I write the problem at the buttom [CODE]void main() { string option; warehouse car[2]; car[0].inputCar("lamborgini",true); car[0].showCar(); car[1].inputCar("ferrari",false); car[1].showCar(); //display the choices of the user cout<<"a) Show number of modified"<<endl; cout<<"b) Show list of modified"<<endl; cin>> option; switch (option[0]) { case 'a': countModified(); break; case …

Member Avatar for NathanOliver
0
115
Member Avatar for meepokman

Hi guys, I'm trying to link a Micro-controller board to my C++ program to control the relays on it. The vendor provided a test software in VB that involved entering the COM port number (4 in my case) and clicking a button to sync up with it, the full software …

Member Avatar for meepokman
0
276
Member Avatar for geeta

can anyone tell me whether i can access databases using c++ i want to connect to ms sql in in c++ program. i hve to create tables in MSSQL using data available in c++ program. very urgent thanks geeta

Member Avatar for marekbar218
0
165
Member Avatar for bujoy
Member Avatar for Suzie999
0
41
Member Avatar for 4221dave

How do I add a manifest file to my dev c++ project? I need the manifest so when a user clicks on my application they're prompted with the "run as administrator" popup.

0
47
Member Avatar for SeanBlack0000

//Cursor.h [code=c] #ifndef CURSOR_H #define CURSOR_H #include <stdlib.h> #include <iostream> template <class Object> class Cursor; // Incomplete Declaration template <class Object> class CNode { public: CNode( const Object & theElement = Object( ), CNode * n = NULL ) : element( theElement ), next( n ) { } Object element; …

Member Avatar for SeanBlack0000
0
213
Member Avatar for rowley4

I am pretty new to programming. I am trying to write a code that counts the occurrence of a word, lists it and also the number of times it appears in a given text. This is what I have, but I can not get it to print the word once …

Member Avatar for babloo 123
0
470
Member Avatar for tsotne1990

Hi guys! Can anyone help me? Im a new to this site and C++ environment. Im running a Microsoft Visual C++ express 2010 and I write a code in 3 separate files. 1 of them is a header file with an extention .h. and 2 of them are .cpp files. …

Member Avatar for chiwawa10
0
79
Member Avatar for chudapati09

[CODE]result = number1 / number2;[/CODE] I am new to C++, but I have some knowledge in Java. What my program does is, the program asks the user two numbers. The user could only select, one, two, or zero. Then the user would select an arithmetic operator: plus, minus, times, divide. …

Member Avatar for Stefano Mtangoo
0
35K
Member Avatar for rahman86

Hi everyone. This is my first post. I have a project to develop an assembler for my studies. The problem is I don't really know how the assembler really works and how can I develop one. It is assembler for mc68000 assembly language. If possible please provide me with a …

0
75
Member Avatar for txmikey

My code generate a Hollow Square with user given width and Height but when the user is prompted to continue or stop it generates a Run-Time Check Failure #2 - Stack around the variable 'ans' was corrupted. Here is my code, any help much appreciated. [code] // SadaMiguel_RectangleFinal.cpp : Defines …

Member Avatar for txmikey
0
204
Member Avatar for burcin erek

wrong reading. wht I want is name and surname=burcin erek number=783389 but output name and surname=burcin number=erek it is so funny but no solution. #include <cstdlib> #include <iostream> #include <fstream> #include <conio.h> #include <string> using namespace std; void file_read() { string name1; string numb1; ifstream f("file1.txt"); f>>name1>>numb1; cout << "name …

Member Avatar for burcin erek
0
118
Member Avatar for 1989sam

I'm trying to put a 2 dimensional array in a queue... How could I do that? #include<iostream> #include<queue> using namespace std; struct state { int puzzle[2][2]; }; int main() { state p; p.puzzle[0][0]=1; p.puzzle[0][1]=2; p.puzzle[0][2]=3; p.puzzle[1][0]=8; p.puzzle[1][1]=0; p.puzzle[1][2]=4; p.puzzle[2][0]=7; p.puzzle[2][1]=6; p.puzzle[2][2]=5; queue<int> Queue; Queue[front] = p; while(!Queue.empty()) { cout<<" "<<Queue.front()<<endl; …

Member Avatar for mrnutty
0
5K
Member Avatar for vikalp-singh

hi sir i know c and c++ but i don know how to make softwares , i know about softwares models and all i can make progrnms as well but i want to know how can i make those program interact with my OS ,for example an antivirus software

Member Avatar for mrnutty
0
112
Member Avatar for cogitoergosum18

hi there, i need to create a function that reads a series of numbers from a file and returns to the main function the mean of those numbers. I am having trouble with the syntax of array parameters and arguments (i don't know how to call the function if it …

Member Avatar for mrnutty
0
278
Member Avatar for epicbeast9022

Hi everyone, I'm trying to program a game in C++ using SDL and i want to get peoples names. its not working though, and I'm really confused as to [B]why[/B]. :?: i'm using code like the following: [B]StringInput.h[/B] [CODE] class StringInput { private: std::string str; SDL_Surface *text; int x,y,r,g,b; SDL_Color …

Member Avatar for Stefano Mtangoo
0
570
Member Avatar for usagi

Hi everyone at daniweb! First off I want to say thanks for starting this awesome homepage, though googleing ive found many clues and answers in here for my projects, things that were left undocumented or just poorly explained by those books that ive used. But now, onto the issue! What …

Member Avatar for usagi
0
202
Member Avatar for daviddoria

In the past when I've done this: [code] int function(int a) { if(a == 2) { return true; } else { return false; } } [/code] the compiler has complained that the function may not return a value. I've fixed this by adding: [code] int function(int a) { if(a == …

Member Avatar for mrnutty
0
216
Member Avatar for myk45

Hello. im having a small problem creating a tree. im not sure where im going wrong. Can anyone please help? Thanks. Here is the code: [CODE] #include <stdio.h> #include <stdlib.h> struct tree_el { int val; struct tree_el *right; struct tree_el *left; }; typedef struct tree_el node; void printout(node *tree) { …

Member Avatar for myk45
0
217
Member Avatar for nerdygirl118

Hi, I'm in a beginning class in C++ and we need to make an assignment that inputs a file, prints it to the screen, and then prints it to the screen again with an underscore every 5 blanks. I got the last part to work, but I can't get it …

Member Avatar for nerdygirl118
0
146
Member Avatar for mayyubiradar

Hello All, First of all, I am beginner so please bear with me. :) I want to extract data within the table from a html code. Lets consider HTML code to be in a file. I have read the data to a variable. Now using this variable I want to …

Member Avatar for mayyubiradar
0
609
Member Avatar for SgtMe

Have another problem with an OBJ model format converter I'm making. As a test, I want to read in data from an OBJ file, and write it out in a different format, and then the other way around. The problem I currently have is that I want it to be …

Member Avatar for SgtMe
0
196
Member Avatar for Eagles36

I want to know how to create a makefile so that I dont have to type in the files I am linking together. Also is it possible to use a make file which will run two files. I have a fraction.h file and fraction.cxx (implentation file) I have a main.cpp …

Member Avatar for caut_baia
0
190
Member Avatar for iw2z

Hi all, I'm sure this is a trivial question for the veterans (and the newbs maybe as well). But I just can't find a straight answer to it. So here it goes: I have my main.cpp file, and 2 more files, custom.h and custom.cpp. Obviously, custom.h would contain declarations, prototype...etc, …

Member Avatar for Ancient Dragon
0
176
Member Avatar for ds.eickhoff

I am new to this site, but is there anyone out there who could point me in a different direction. I am trying to get the "Knights Tour" to work. The issue that I am having is that it seems to print several number twice.

Member Avatar for gashtio
0
178
Member Avatar for crazylunatic

I have been doing a small project as part of my lab assignments and I encountered this funny probelm while working with the files in C++. I have this class Member which I am using to store the member details. [code=c++] class Member { private: char name[30]; long int userid; …

Member Avatar for deeps84
1
337
Member Avatar for Crisis757

{ int age; cout <<"Enter Age" << end1; cin >> age; cout <<"The age you entered is" << age return 0 }

Member Avatar for dodo rawash
1
168
Member Avatar for burcin erek

distance does not name type mistake even though I suppose that I am right. pls help [CODE]#include <cstdlib> #include <iostream> #include <conio.h> #include <sstream> // struct unit with loop inside.... using namespace std; struct distance { int mt; float cm; }; struct room { distance length; distance width; }; int …

Member Avatar for burcin_erek
0
97

The End.