49,757 Topics
| |
Hello, I am still rather new to Gtk and have a problem (obviously). I have been defining the size of a main_window and the window's size does not change. Anyhow, I am hoping someone can help me. [CODE] main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(main_window), main_title); gtk_window_set_position(GTK_WINDOW(main_window), GTK_WIN_POS_CENTER); gtk_window_set_default_size(GTK_WINDOW(main_window), 800, 200);[/CODE] | |
| |
Hi - I've been at this for hours, so... say hello to my first post. I'd like to allow my many cpp files to call on a function from DLL funcs I've brought in using LoadLibrary/GetProcAddress/etc, but, when I include the header file into the multiple cpp's, I get the … | |
My contrive s neutral was to determine the hurrying of C compared to C++ (planning languages). I intellection that C++ would be faster, because it was codified many newly. Methods/Materials I utilized two books for testimonial, Herb Schildt's C++: The Staring Write, and Instruct Yourself C++, also by Schildt. I … | |
WHAT IS THE SOURCE CODE OF THIS STATEMENT OR IN THIS QUESTION?? QUESTION IS: enter 15 integers in the range of 1-20.find how many of these values fall in the range of 1-50, 51-100, 101-150 and 151-200.Validate the input so that only values from 1-200 will be entered. can u … | |
#include<iostream> using namespace std; int main() { int i=119; while(i>=3){ cout<<" "<<i; i--; } system("pause"); return 0; } cout of this is counting 119 decrement til 3 but output should this: 119 94 72 53 37 24 14 7 3 could any1 help? thanks a lot guys!:D | |
Could someone give me help on how to simplify this? Trying to write code to solve this equation: Distance = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2) I subbed a,b,c as the second set of coords. Im probably using too many vars as weel but im … | |
I have been trying to figure out how to build this library on Windows for damn near 6 hours, and I am at a complete loss. I have found a lot of answers on these forums before, so I joined up hoping someone might have some idea. The INSTALL file, … | |
Hi During the last 6 months or so I've worked on and off on a couple of a classes to send data over network using winsock and asynchronous sockets on windows. Basically my system works like this. The server will send packets on a connection until WSAGetLastError() returns WSAEWOULDBLOCK the … | |
I'm trying to write a method that draws a rectangle. If the user enters height = 4, and width = 8, and the print of character " * ", then the left rectangle is drawn on the left if the filled flag is true. If the flag is false, then … | |
hello every one i make a project about linked list and do some functions on the linked list i want to sort the name in the linked list alphabetical i wrote this code but there is something wrong in it anyone can help thanks :) [CODE]# include <iostream> using namespace … | |
[CODE=C] #include <cstdlib> #include <iostream> #include <conio.h> #include <new> using namespace std; class Array { struct node { char *str; int item; struct node *next; }*p; public : Array() { p = NULL; } ~Array() { node *s; if(p == NULL) return; while(p != NULL) { s = p->next; delete … | |
for (int counter = 0; counter > size ; counter ++ ) { sum = sum + score[counter]; } average = sum /size; cout << "The average Score is:" << average << endl; } void sortData(string* name, int* score, int size) { int index_one, index_two; char temp; for ( index_one … | |
plz how i can delete a specific value in linkedlist .. | |
i have to make a program that facilitates the returning of lost pets to their owners, my current step to start is to make a function that populates the struct. here is my current work: [CODE]#include <iostream> #include <string> #include <cstdlib> #include <fstream> #include <iomanip> using namespace std; const int … | |
How do you sort names alphabetically using functions in C++ from file? After the last set of words has been processed the program is to print out a) the number of sets processed b) the number of sets that were in alphabetical order to start with, and needed no rearranging. … | |
Hi, I'm trying to write a program that will take an infix notation postifx RPN. My problem is that I can't get it to print out the new equation if someone could try and help me out with that, Iit would be greatly appreciated. [CODE]#include <iostream> #include <queue> #include <stack> … | |
I have to compute the olympic average(removing highest and lowest score and then taking the average of what's left) using a for loop and if statements. I can get the lowest value out, but I can't get the highest. Here's what I have so far: [CODE]// ,CMPSC , olympic average … | |
it suppose to look like this Trapezoid with height 4, base1 3 and base2 9 EEE EEEEE EEEEEEE EEEEEEEEE but nothing is happening this is my code [code] else if (letter =='Q' || letter =='q') { cin>>hei>>wei>>draw; base = hei*2; cout<<"Trapezoid with height "<<hei<<"base1 "<<wei<<"and base2 "<<base; cout<<endl; for(i=1;i<hei;i++) { … | |
Hi! I've recently converted some C code to a bit more native C++. This included changing printf() statements to std::cout statements. However, some printf()'s are rather lengthy and annoyingly long (and human-error-prone) to write in std::cout. Example (and this one is a short one): C-style: [CODE]printf("ERROR %d: %s: %s\n", event, … | |
there are two text files, one called target.txt and template.txt i can only get my program to read in the text files.. im not sure how i can echo print them to the screen and format them to a table please any help would be appreciated! 1. Reads the target … | |
So, I've heard rumors that you can write web apps in C++. Is that true? | |
[CODE] // Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <vector> #include <algorithm> using namespace std; //Functions void welcome(); void instructions(); int game(string sofar, const string THE_WORD, int MAX_WRONG, int wrong, string used); // Types and Arrays string choice; string inst; const int MAX_WRONG … | |
Hey guys.. thanks in advance for whosoever helps and gives their views.. So I am facing some problems with my CS program... which is in c++ and is about heaps.. its pretty basic stuff.. [B]Here's the Heap.cpp (implementation file)[/B] [ICODE]/** @file Heap.cpp */ #include "Heap.h" // header file for class … | |
when i release a library of code for example my "stack class" where should i put the exception handling code for it? for example... should it be stack.h stack.cpp stackExceptions.h stackExceptions.cpp or..... like this stack.h <--- embed stack exception interface in here stack.cpp <--- embed stack exception implementation in here … | |
Hello all, I am have a text file with a list of windows services. Is there a way to check if the computer I'm working on has a specific service installed(Currently Win7 but needs to work for Vista and XP too? I want to do something like this: [CODE]bool found … | |
Hello there; I am new to object oriented programming need to use vectors. basically I have data from CSV file and I stored it in a vector. I need to partition this vector to n vectors and I need it to be dynamic. I started using class in order to … | |
[CODE]#include <iostream.h> #include <windows.h> #include<conio.h> void gotoxy(short x, short y) { HANDLE hConsoleOutput; COORD Cursor_Pos = {x, y}; hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hConsoleOutput, Cursor_Pos); } void clrscr(void) { CONSOLE_SCREEN_BUFFER_INFO csbi; HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); COORD coord = {0, 0}; DWORD count; GetConsoleScreenBufferInfo(hStdOut, &csbi); FillConsoleOutputCharacter(hStdOut, ' ', csbi.dwSize.X * csbi.dwSize.Y, coord, &count); … | |
[CODE]#include<iostream.h> int liner(int [], int ,int ); void main () { int a[1000]; int arraysize,element; int searchkey; cout<<"Enter how many elements in your array"; cin>>arraysize; cout<<"enter the elements of the array "; for(int i=0;i<arraysize;i++) cin>>a[i]; cout<<"Enter the searchkey"; cin>>searchkey; element=liner (a,searchkey,arraysize); if (element!=-1) cout<<"::::Found value in index \n"<<element<<"\n"; else cout<<"::::value … | |
[I]<<mod edit: answer to [URL="http://www.daniweb.com/software-development/python/threads/32007/1496502#post1496502"]this post[/URL] from the sticky "[URL="http://www.daniweb.com/software-development/python/threads/32007"]projects for the beginner[/URL]">>[/I] [CODE] #1 * 8 + 1 = 9 #12 * 8 + 2 = 98 #123 * 8 + 3 = 987 #1234 * 8 + 4 = 9876 #12345 * 8 + 5 = 98765 #123456 … |
The End.