49,757 Topics

Member Avatar for
Member Avatar for thekitoper

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]

Member Avatar for Sky Diploma
0
173
Member Avatar for aleemoe
Member Avatar for L7Sqr
0
81
Member Avatar for stylemonger

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 …

Member Avatar for stylemonger
0
669
Member Avatar for moritz11

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 …

Member Avatar for Narue
-1
224
Member Avatar for ryannans

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 …

Member Avatar for arkoenig
0
227
Member Avatar for opawix

#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

Member Avatar for opawix
0
86
Member Avatar for pharoah85

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 …

Member Avatar for pharoah85
0
214
Member Avatar for CrimsonGT

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, …

Member Avatar for vladoX
-1
490
Member Avatar for kerp

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 …

Member Avatar for gusmcn
0
503
Member Avatar for stan2000

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 …

Member Avatar for richieking
0
2K
Member Avatar for sara90

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 …

Member Avatar for Chilton
0
89
Member Avatar for loveranjan

[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 …

Member Avatar for drkybelk
0
195
Member Avatar for fsamu2001

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 …

Member Avatar for thekashyap
0
141
Member Avatar for programing
Member Avatar for Nicko_FaTe_

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 …

Member Avatar for jonsca
0
129
Member Avatar for biancaW

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. …

Member Avatar for thekashyap
0
128
Member Avatar for Charlton21

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> …

Member Avatar for WaltP
0
153
Member Avatar for hobbyenthusiast

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 …

Member Avatar for WaltP
0
265
Member Avatar for ladylady

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++) { …

Member Avatar for PathikRaval
0
106
Member Avatar for nightcracker

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, …

Member Avatar for mike_2000_17
0
741
Member Avatar for milanna1992

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 …

Member Avatar for milanna1992
0
171
Member Avatar for Khoanyneosr
Member Avatar for Khoanyneosr
0
147
Member Avatar for Khoanyneosr

[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 …

Member Avatar for Khoanyneosr
0
277
Member Avatar for CSWalls

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 …

Member Avatar for CSWalls
0
249
Member Avatar for lochnessmonster

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 …

Member Avatar for mike_2000_17
0
157
Member Avatar for bsquinn1451

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 …

Member Avatar for Ancient Dragon
0
110
Member Avatar for banoo2010

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 …

Member Avatar for banoo2010
0
285
Member Avatar for Chelle_032206

[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); …

Member Avatar for LevyDee
-1
83
Member Avatar for programing

[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 …

Member Avatar for programing
0
167
Member Avatar for ywang

[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 …

Member Avatar for vegaseat
0
1K

The End.